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

Updated auto approve example to minimizing notifications #188

Merged
merged 1 commit into from Mar 29, 2022

Conversation

mwaddell
Copy link
Contributor

closes #138

if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ];
then gh pr review --approve "$PR_URL"
else echo "PR already approved, skipping additional approvals to minimize emails/notification noise.";
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there might be a way to avoid the need for the checkout by passing in the right event property to actions/checkout to get the ref rather than the detached head state.

I'm travelling at the moment so I haven't been able to carve out time to verify this, but this is better than it was so I'm 👍🏻 on merging this.

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

Successfully merging this pull request may close these issues.

Docs: Update Example to minimize Approval-notification-spam
2 participants