-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Enhance release notes generation with optional tag input and workflow adjustments #62
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 1 commit
c272beb
2f646ef
39b7303
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 | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,8 +2,13 @@ name: Generate Release Notes | |||||||
|
|
||||||||
| on: | ||||||||
| release: | ||||||||
| types: [published, prereleased, released, created] | ||||||||
| types: [published, prereleased, created] | ||||||||
| workflow_dispatch: | ||||||||
| workflow_call: | ||||||||
| inputs: | ||||||||
| tag: | ||||||||
|
||||||||
| tag: | |
| tag: | |
| description: 'Release tag to generate notes for. If not provided, uses the release event tag or the most recent tag.' |
Outdated
Copilot
AI
Nov 16, 2025
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.
The tag determination logic doesn't handle the workflow_call event properly. When triggered via workflow_call, the github.event_name will be "workflow_call", not "release" or "workflow_dispatch". If no tag input is provided (which is allowed since required: false), both conditions on lines 51 and 55 will be false, causing the workflow to exit with an error on line 61.
Consider adding a fallback for the workflow_call case:
if [[ -z "${TAG_NAME}" ]]; then
# Fallback to most recent tag for workflow_call or other triggers
TAG_NAME="$(git tag --sort=-creatordate | head -n 1 || true)"
fiThis would make the workflow more robust, even though the current caller always provides a tag.
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.
The
release-notesjob will run even when thereleasejob is skipped due to the conditionif: startsWith(github.ref, 'refs/tags/'). When triggered byworkflow_dispatchwithout a tag (wheregithub.refwould be a branch), thereleasejob will be skipped, butrelease-noteswill still attempt to run and call the release-notes-generator workflow.Consider adding the same condition to the
release-notesjob: