-
-
Notifications
You must be signed in to change notification settings - Fork 304
ci: run update-changelogs on comment for non-release PRs #10077
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,7 +92,7 @@ jobs: | |
| react-to-comment: | ||
| name: React to the comment | ||
| needs: is-release | ||
| if: needs.is-release.outputs.is-release == 'true' && github.event_name == 'issue_comment' | ||
| if: github.event_name == 'issue_comment' | ||
| runs-on: ubuntu-latest | ||
| environment: default-branch | ||
| permissions: | ||
|
|
@@ -123,7 +123,7 @@ jobs: | |
| update-changelogs: | ||
| name: Update changelogs | ||
| needs: is-release | ||
| if: ${{ needs.is-release.outputs.is-release == 'true' }} | ||
| if: needs.is-release.outputs.is-release == 'true' || github.event_name == 'issue_comment' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing commenter write-access gateHigh Severity Commenting Additional Locations (1)Reviewed by Cursor Bugbot for commit 17aea1a. Configure here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is pre existing
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment seems correct, we would need to bail out on forks. Which we aren't doing anymore if we allow it on non-releases.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but this is pre-existing behavior. It means that on any PR opened from within the repository, a comment from any person could trigger the workflow. Nothing changes here. The existing fork check only verifies that the workflow is not running from a forked repository. It does not check whether the person commenting on a non-fork PR is a legitimate/authorized user.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean even previously when it was scoped to release PRs only. Anyone could have triggered this by a comment. On the bot's actual point, it's about who typed the comment, not about forks.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to allow
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about that too. However, doing this would cause many runs to consume compute credits unnecessarily, since the likelihood of a PR actually needing changelog updates for package bumps is relatively low. We’re still planning to automatically plug this workflow into Dependabot PRs, for example. So I believe keeping it this way is still the better option.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True, alright. |
||
| runs-on: ubuntu-latest | ||
| environment: default-branch | ||
| permissions: | ||
|
|
||


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.
Side-note: Should we consider running this on draft releases too? It seems a bit confusing you have to bring it out of draft to get the bot to run automatically
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.
We only do this for non-draft PRs. We assume CI could still be failing, or the person may not have prepared the release correctly or fixed all the constraints (for using the correct versions), so the workflow needs to be safe to run more than once. (assuming people are correctly using the draft state)
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.
Hmm. I can see both sides on this and don't have a strong opinion. That said even if more people are likely to post a comment than wait for the workflow to run then it would act similar to the "update LavaMoat policies" workflow in Extension, which is an established pattern. So maybe the way you have it is okay?