Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: Release — Version Bump & Publish
# Runs on every direct push to main (human or PR merge).
# Bot-authored commits are skipped to prevent infinite loops.
Comment thread
chefgs marked this conversation as resolved.
Outdated
on:
push:
branches: [main]
workflow_dispatch:
inputs:
branch:
description: 'Default Branch Name'
required: true
default: 'main'
Comment on lines +6 to +11
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch adds a required branch input, but it isn’t used anywhere (e.g., actions/checkout still uses the default ref). As-is, the input has no effect and may confuse users. Also, switching from push to workflow_dispatch changes the event payload; later job conditions reference github.event.head_commit.message, which is absent for workflow_dispatch and can cause the job if: expression to behave unexpectedly/fail. Consider (a) using inputs.branch in checkout (ref:) and/or PR base, and (b) guarding the head_commit-based skip logic to only run on push events (or default missing messages to an empty string).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied both fixes in df3f986:

  1. inputs.branch wired into checkout — added ref: ${{ inputs.branch }} so the workflow actually checks out the branch the user specifies when triggering manually.
  2. head_commit.message guarded with || '' — each reference to github.event.head_commit.message in the job if: condition now falls back to an empty string when the field is absent (as it is for workflow_dispatch), so the skip-loop guards evaluate correctly without failing.


permissions:
contents: write # needed to push the release branch and create tags
Expand Down
Loading