-
Notifications
You must be signed in to change notification settings - Fork 94
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
ci(release): Add killswitch via issues w/ release-blocker label #714
Conversation
Implements app.asana.com/0/1169344595888357/1146357826982899/f which would cancel the workflow (stop the release) when the repo has open issues with the label 'release-blocker'.
- id: killswitch | ||
if: ${{ !github.event.inputs.force }} | ||
run: | | ||
if curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=release-blocker" | grep -Pzvo '\[[\s\n\r]*\]'; then |
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.
Perhaps it makes sense to add the GitHub token to this request too?
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.
Why do you think so? The token would only help with 2 issues (as far as I can tell):
- If this repo was private
- If there was any rate limiting concerns
I see none apply here. Do you have something else in mind that I am missing?
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.
Rate limiting, mostly. I remember Travis had a rate-limiting issue at some point when talking to GitHub, and since we already have the token in the environment, we could just use it to be on the safe side.
I know it's GitHub Actions, but they still must have a limited number of IPs in their disposal.
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.
from experience, in travis you pretty much hit the unauthenticated rate limits instantly when doing api requests on every master push, but this only runs per release. it should be fine but adding the token seems like a low-hanging fruit still:
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
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.
I'll pass for now until this becomes a real issue to keep things simpler. Thanks a lot for pointing this out though.
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.
LGTM and makes a lot of sense, thanks!
* master: fix: Coerce missing PR body to empty string meta(gh): Add a status check for changelogs (#700) ref(server): Manually control concurrent upstream requests (#678) fix(docs): Clarify sooner which mode to choose (#709) chore(config): Remove config for emitting attachment flags (#718) fix(protocol): Fix docs typo (#719) fix(doc): Add missing newlines (#717) ci(release): Add killswitch via issues w/ release-blocker label (#714) fix: Add changelog entry for #712 (#716)
Implements https://app.asana.com/0/1169344595888357/1146357826982899/f which would cancel the workflow (stop the release) when the repo has open issues with the label 'release-blocker'.