Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,10 @@ jobs:
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-notes:
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

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

The release-notes job will run even when the release job is skipped due to the condition if: startsWith(github.ref, 'refs/tags/'). When triggered by workflow_dispatch without a tag (where github.ref would be a branch), the release job will be skipped, but release-notes will still attempt to run and call the release-notes-generator workflow.

Consider adding the same condition to the release-notes job:

release-notes:
  if: startsWith(github.ref, 'refs/tags/')
  needs: release
  uses: ./.github/workflows/release-notes-generator.yml
  with:
    tag: ${{ github.ref_name }}
  secrets: inherit
Suggested change
release-notes:
release-notes:
if: startsWith(github.ref, 'refs/tags/')

Copilot uses AI. Check for mistakes.
needs: release
uses: ./.github/workflows/release-notes-generator.yml
with:
tag: ${{ github.ref_name }}
secrets: inherit
15 changes: 11 additions & 4 deletions .github/workflows/release-notes-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

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

[nitpick] The tag input is missing a description field. While not strictly required, adding a description improves workflow documentation and helps users understand the input's purpose.

Consider adding:

workflow_call:
  inputs:
    tag:
      description: 'Release tag to generate notes for. If not provided, uses the release event tag or the most recent tag.'
      required: false
      type: string
Suggested change
tag:
tag:
description: 'Release tag to generate notes for. If not provided, uses the release event tag or the most recent tag.'

Copilot uses AI. Check for mistakes.
required: false
type: string

permissions:
contents: write
Expand Down Expand Up @@ -42,10 +47,12 @@ jobs:
run: |
set -euo pipefail

if [[ "${{ github.event_name }}" == "release" ]]; then
TAG_NAME="${{ inputs.tag }}"
if [[ -z "${TAG_NAME}" && "${{ github.event_name }}" == "release" ]]; then
TAG_NAME="${{ github.event.release.tag_name }}"
else
# workflow_dispatch - use most recent tag by creation date
fi

if [[ -z "${TAG_NAME}" && "${{ github.event_name }}" == "workflow_dispatch" ]]; then
TAG_NAME="$(git tag --sort=-creatordate | head -n 1 || true)"
fi
Copy link

Copilot AI Nov 16, 2025

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)"
fi

This would make the workflow more robust, even though the current caller always provides a tag.

Copilot uses AI. Check for mistakes.

Expand Down
Loading