Repository navigation
Add CHANGELOG.md modification check and warning comment #4217
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
Open
mario-campos
wants to merge
26
commits into
main
Choose a base branch
from
mario-campos/warn-on-changelog-write
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
b2b77a8
Add CHANGELOG.md modification check and warning comment
mario-campos fbd33ac
Gate comment-post step on successful fetch-base
mario-campos 43ac64c
Use `gh api` instead of third-party Action
mario-campos f7aa9dc
Move post-comment step to `post-pr-comments` job
mario-campos 780e947
Skip CHANGELOG.md modification warning for release and backport PRs
mario-campos ae75d46
Exclude "Mergeback" and "Update default bundle" PRs from CHANGELOG.md…
mario-campos 6e4d3fb
Use a sticky comment to warn about CHANGELOG.md changes
mario-campos d97a656
Update CHANGELOG.md warning message to reference change-notes directory
mario-campos ccdf690
Escape backticks PR comment body
mario-campos 928548a
Refine exclusion conditions for CHANGELOG-modification comment
mario-campos 0707124
Delete CHANGELOG.md-modification comment if CHANGELOG.md no longer mo…
mario-campos 27d37d9
Format all file references as inline Markdown code spans
mario-campos 9fe741e
Simplify `if` condition of CHANGELOG-comment-post step
mario-campos 8c8b082
Add script and Action for managing PR comments
mario-campos 14cefaa
Replace bash/run step with local Action `post-comment`
mario-campos 4d464b0
Improve issue ID parsing and validation logic
mario-campos 3c452a1
Use HTTP link to `unreleased-change-notes/README.md`
mario-campos f1419b8
Reject empty `--marker`
mario-campos e7dadca
Refactor comment handling logic into `performAction` for improved tes…
mario-campos ae9f97b
Make post-comment marker configurable
mario-campos 90d1bc9
Remove bespoke post-comment argument validation
mario-campos ae23865
Move comment branching into workflow steps
mario-campos 9448877
Simplify post-comment to a single set-comment mode
mario-campos 03137fc
Rename changelog outputs to modified
mario-campos 36f220a
Remove unused post-comment step IDs
mario-campos c069d49
Test sticky comments using observable state
mario-campos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: "Post comment" | ||
| description: "Create or update a sticky PR comment identified by a caller-provided marker." | ||
| inputs: | ||
| marker: | ||
| description: "Non-empty marker identifying the comment. Use a unique, stable HTML comment for each distinct comment." | ||
| required: true | ||
| body: | ||
| description: "Full comment markdown." | ||
| required: true | ||
| issue-id: | ||
| description: "The issue or pull request number to post/update the comment on. Defaults to the current pull request if not provided." | ||
| required: false | ||
| token: | ||
| description: "The GitHub token to authenticate with." | ||
| required: true | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Post comment | ||
| shell: bash | ||
| env: | ||
| BODY: ${{ inputs.body }} | ||
| MARKER: ${{ inputs.marker }} | ||
| GH_TOKEN: ${{ inputs.token }} | ||
| ISSUE_ID: ${{ inputs.issue-id || github.event.pull_request.number }} | ||
| run: | | ||
| npx tsx ./pr-checks/post-comment.ts \ | ||
| --body "$BODY" \ | ||
| --marker "$MARKER" \ | ||
| --issue-id "$ISSUE_ID" \ | ||
| --repository "$GITHUB_REPOSITORY" |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.