-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fetch less and use the right SHA #5621
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
Conversation
jamadeo
commented
Nov 7, 2025
- speed up fetches by only fetching what we need
- set the right head SHA when generating the release log
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.
Pull Request Overview
This PR optimizes git fetch operations in the release workflow by fetching only specific branches and refs instead of all remote data, improving performance and reducing unnecessary network traffic.
- Modified git fetch commands to target specific branches and refs
- Captured and passed the HEAD commit SHA explicitly through environment variables
- Replaced generic fetch operations with targeted ones using specific branch/ref names
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/merge-release-pr-on-tag.yaml |
Updated git fetch to only fetch the specific branch needed for SHA comparison |
.github/workflows/create-release-pr.yaml |
Captured HEAD commit SHA and passed it explicitly instead of relying on GitHub event context |
.github/actions/generate-release-pr-body/action.yaml |
Changed git fetch from fetching all tags to fetching specific refs for release notes generation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| TEMPLATE_FILE: "${{ github.action_path }}/pr_body_template.txt" | ||
| run: | | ||
| git fetch origin --tags | ||
| git fetch origin "$HEAD_REF" "$PRIOR_REF" |
Copilot
AI
Nov 7, 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 git fetch command is attempting to fetch $HEAD_REF and $PRIOR_REF as if they were branches or tags, but $HEAD_REF is a commit SHA (from git rev-parse HEAD). Git fetch expects refspecs, not arbitrary commit SHAs. This will likely fail with an error like "fatal: couldn't find remote ref [SHA]".
If the goal is to ensure these commits are available locally, they should already be present since HEAD_REF is the current commit and PRIOR_REF appears to be a tag reference. If you need to fetch tags, consider using git fetch origin --tags or fetch specific tags like git fetch origin "refs/tags/$PRIOR_REF" if $PRIOR_REF contains a tag name.
| git fetch origin "$HEAD_REF" "$PRIOR_REF" | |
| git fetch origin "refs/tags/$PRIOR_REF" |
…eanup * 'main' of github.com:block/goose: Use session IDs as task IDs for subagents instead of UUIDs (#5398) Fix the naming (#5628) fix: default tetrate model is broken, replace with haiku-4.5 (#5535) (#5587) Fetch less and use the right SHA (#5621) feat(ui): add custom macOS dock menu with New Window option (#5099) feat: remove hints from recipe prompts (#5622) docs: October 2025 Community All-Stars spotlight, Hacktoberfest edition (#5625) differentiate debug/release in cache key (#5613) Unify subrecipe and subagent execution through shared recipe pipeline (#5082)
* origin/main: (34 commits) Remove some logging (#5631) Use session IDs as task IDs for subagents instead of UUIDs (#5398) Fix the naming (#5628) fix: default tetrate model is broken, replace with haiku-4.5 (#5535) (#5587) Fetch less and use the right SHA (#5621) feat(ui): add custom macOS dock menu with New Window option (#5099) feat: remove hints from recipe prompts (#5622) docs: October 2025 Community All-Stars spotlight, Hacktoberfest edition (#5625) differentiate debug/release in cache key (#5613) Unify subrecipe and subagent execution through shared recipe pipeline (#5082) Standardize CLI argument flags and update documentation (#5516) Release 1.13.0 fix: move goosehints/AGENTS.md handling to goose, and out of developer extension (#5575) fix: add standard context menu items to prevent empty right-click menu (#5616) Bump openapi in prepare-release (#5611) docs: add access control section to Developer tutorial (#5615) Token state not showing on load, or after message is finished. (#5606) Change the other location too (#5608) feat(ui): bring back quick launcher (#5144) Support platform tools through CLI (#5570) ...
* main: (33 commits) Fix Claude Code provider to default to Auto mode (#5638) (#5642) Scheduler cleanup (#5571) Better search paths and handling of CLI providers (#5554) docs: description required for "Add Extension" in cli - phase 2 (#5635) Remove some logging (#5631) Use session IDs as task IDs for subagents instead of UUIDs (#5398) Fix the naming (#5628) fix: default tetrate model is broken, replace with haiku-4.5 (#5535) (#5587) Fetch less and use the right SHA (#5621) feat(ui): add custom macOS dock menu with New Window option (#5099) feat: remove hints from recipe prompts (#5622) docs: October 2025 Community All-Stars spotlight, Hacktoberfest edition (#5625) differentiate debug/release in cache key (#5613) Unify subrecipe and subagent execution through shared recipe pipeline (#5082) Standardize CLI argument flags and update documentation (#5516) Release 1.13.0 fix: move goosehints/AGENTS.md handling to goose, and out of developer extension (#5575) fix: add standard context menu items to prevent empty right-click menu (#5616) Bump openapi in prepare-release (#5611) docs: add access control section to Developer tutorial (#5615) ...
* main: (83 commits) silence copilot on minor text issues (block#5665) fix: disallow runaway subagent chains (block#5659) chore: remove usage of non-existent env var for log dir (block#5658) clarify agent instructions (block#5655) feat: add check-everything for unified style checks (block#5650) Show errors on failure (block#5643) custom instructions for copilot reviews (block#5646) fix: prevent repeated 404 errors when accessing deleted sessions (block#5644) Flake.nix corrected main (block#5600) fix: goose recipe list can return duplicated entries (block#5645) fix: bedrock creds refresh (block#5599) Fix Claude Code provider to default to Auto mode (block#5638) (block#5642) Scheduler cleanup (block#5571) Better search paths and handling of CLI providers (block#5554) docs: description required for "Add Extension" in cli - phase 2 (block#5635) Remove some logging (block#5631) Use session IDs as task IDs for subagents instead of UUIDs (block#5398) Fix the naming (block#5628) fix: default tetrate model is broken, replace with haiku-4.5 (block#5535) (block#5587) Fetch less and use the right SHA (block#5621) ...
Signed-off-by: Blair Allan <[email protected]>