Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pr.reviewers always returns empty list when configured in cm repo #516

Closed
bartkuzio opened this issue May 17, 2024 · 1 comment
Closed
Labels
bug Something isn't working 👀.

Comments

@bartkuzio
Copy link

Issue description

I have the following automation in my gitstream.cm file in cm repo:

  label_missing_reviewers:
    if:
      - {{ pr.reviewers | length < 2 }}
    run:
      - action: add-label@v1
        args:
          label: "⚠️ missing reviewers"
          color: "#008672"
      - action: add-comment@v1
        args:
          comment: "Reviewers count: {{ pr.reviewers | length }}"

When running this automation on any PR it always adds the label and the comment says Reviewers count: 0 no matter how many reviewers are added.
The same automation added on a specific repository works fine, so the issue is with the organization wide automation.

I cannot show the PR as it's in a private repo.

Expected behavior

pr.reviewers | length should return the count of reviewers of the PR.

Screenshots
image

image

@bartkuzio bartkuzio added the bug Something isn't working label May 17, 2024
@vim-zz vim-zz added the 👀. label May 19, 2024
@vim-zz
Copy link
Collaborator

vim-zz commented May 19, 2024

@bartkuzio thank you for reporting! there was a regression that caused this context variable to be always empty in GitHub. It was fixed.

@vim-zz vim-zz closed this as completed May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👀.
Projects
None yet
Development

No branches or pull requests

2 participants