Skip to content
Merged
Changes from all commits
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
5 changes: 4 additions & 1 deletion golang/pre-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
ignored_branches:
description: Branches to ignore when merging up changes
required: true
dry_run:
description: Whether this is a dry run
required: true

runs:
using: composite
Expand All @@ -36,7 +39,7 @@ runs:
fallbackBranch: 'master'
ignoredBranches: ${{ inputs.ignored_branches }}
- name: "Manually merge up changes"
if: ${{ inputs.push_changes == 'true' && ! contains(fromJSON(inputs.ignored_branches), github.ref_name) && steps.get-next-branch.outputs.hasNextBranch }}
if: ${{ inputs.dry_run == 'false' && inputs.push_changes == 'true' && ! contains(fromJSON(inputs.ignored_branches), github.ref_name) && steps.get-next-branch.outputs.hasNextBranch }}
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The dry_run input is used in the conditional but is not defined in the inputs section of this action. This will cause the action to fail when invoked.

To fix this, add the dry_run input definition to the inputs section, similar to how it's defined in other actions in the codebase (e.g., python/pre-publish/action.yml:18-20, ruby/publish/action.yml:23-25). The input should be required and have a description explaining its purpose.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

Consider also adding the dry_run check to the "Determine branch to merge up to" step condition (line 32) to avoid unnecessary computation. When dry_run is true, this step will execute but its output won't be used since the merge step is now skipped. The condition on line 32 could become: inputs.dry_run == 'false' && inputs.push_changes == 'true' && ! contains(fromJSON(inputs.ignored_branches), github.ref_name) for consistency and efficiency.

Copilot uses AI. Check for mistakes.
shell: bash
run: |
git checkout ${NEXT_BRANCH}
Expand Down
Loading