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

Label when *all* reviewers have approved #10

Open
hugovk opened this issue Oct 7, 2019 · 0 comments
Open

Label when *all* reviewers have approved #10

hugovk opened this issue Oct 7, 2019 · 0 comments

Comments

@hugovk
Copy link

hugovk commented Oct 7, 2019

On our project, when an author creates a PR, they choose how many people to review their PR. It's usually 2 people, but sometimes 1, sometimes up to 6.

Rather than labelling when a fixed number have approved (eg. APPROVALS: "2"), would it be possible to label once all the current PR's reviewers have reviewed?

For example:

  • if a PR has 2 reviewers, label when both have reviewed
  • if a PR has 4 reviewers, label when all 4 have reviewed
  • if a PR has 8 reviewers, label when all 8 have reviewed

Perhaps allow something like APPROVALS: "all" in the workflow .yml, and then something like this (pseudocode):

if [[ "$APPROVALS" == "all" ]]; then
    $APPROVALS = length($reviews)
fi

and do it somewhere before this:

https://github.com/pullreminders/label-when-approved-action/blob/d8e895923241c6399899471c5eb91fc3cc717776/entrypoint.sh#L53-L55

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant