-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Add missing permissions to actions publish #16097
Conversation
This commit enhances the publish actions script by including a step to close the pull request after committing the changes. The existing script deletes the branch after pushing the commits, but lacks the functionality to close the associated PR.
brew/Library/Homebrew/dev-cmd/pr-pull.rb Lines 98 to 103 in 5349b76
|
@Bo98 Yes, you are right, it is already been handled but I was getting some errors while testing this. The errors were due to missing permissions. |
Ah ok that makes more sense. So did you find that you could do just the permission changes without the |
This commit adds the missing permissions to the actions publish script. The 'contents: write' permission is required to publish releases and the 'pull-requests: write' permission is required to close the pull request after the changes are committed.
I looked into it and found out that the 'contents: write' permission is required to publish releases and the 'pull-requests: write' permission is required to close the pull request after the changes are committed. It seems like mentioning these permissions explicitly was not required in the past but now it is required. See: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Nice work everyone! |
Thanks 😊 |
This commit enhances the publish actions script by including a step to close the pull request after
committing the changes. The existing script deletes the branch after pushing the commits, but lacks
the functionality to close the associated PR.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Permissions Added:
See: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs