github: Fix outdated aspects of Comment-on-PR.yml and Notify-Convention-Change.yml#291
Merged
mshafer-NI merged 5 commits intoni:mainfrom Mar 17, 2026
Merged
Conversation
…tions-comment-pull-request
Contributor
|
Thank you for contributing! 👋 |
mshafer-NI
approved these changes
Mar 17, 2026
Collaborator
Author
|
FYI @mshafer-NI After you merged this, I tested it with a PR in my personal fork targeting the base repo and it still works. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this Pull Request accomplish?
Remove
with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}when calling thollander/actions-comment-pull-request. This parameter was renamed fromGITHUB_TOKENtogithub-tokenin v3 and has been generating warnings ever since we upgraded, but the action has still been working without it.Remove
uses: actions/checkout. I'm not aware of any reason why commenting on PRs requires checking out a copy of the repo. Also, one of these workflows was usingactions/checkout@main, which Renovate did not pin to a commit SHA because main is a branch, not a tag.Add
permissions: pull-requests: writeso that we can lock down the repo's default permissions for GitHub Actions workflows without breaking this workflow.Add a name for
Comment-on-PR.ymlso it doesn't show up as.github/workflows/Comment-on-PR.ymlin the Actions tab.Why should this Pull Request be merged?
Comment-on-PR.ymlandNotify-Convention-Change.ymluseon: pull_request_target. When someone creates a PR from a fork, this causes the workflows to run using a GitHub token with write access to this repo, not the fork. As a result, we should ensure that these workflows do not perform unnecessary actions that expose them to the contents of the fork repo.What testing has been done?
I committed these changes to the default branch of my personal fork of this repo and created a PR targeting the fork.
Comment-on-PR.ymlsuccessfully commented on the PR withoutwith: GITHUB_TOKEN:oruses: actions/checkout.I also tested it with "workflow permissions" set to "Read repository contents and packages permissions".