Skip to content

Conversation

@EbonyLouis
Copy link
Contributor

This PR updates the Send API Key on PR Merge GitHub Action to prevent the following error:

fatal: Invalid revision range <base_sha>..<head_sha>

This occurred because in pull_request_target events from forked repositories, github.event.pull_request.head.sha refers to a commit in the fork, which isn't available in the target repo's checkout context. That causes the git diff range to fail.


✅ What Changed

  • Replaces git diff $BASE_SHA..$HEAD_SHA with a safe comparison between HEAD and HEAD^ inside the merged PR context.
  • Ensures we only proceed when recipe files were added or modified (--diff-filter=AM).
  • Preserves logic to skip deleted files.
  • Maintains check to only run on merged PRs affecting:

@EbonyLouis EbonyLouis changed the title recipe workflow: FixInvalid revision range error in forked PRs [recipe workflow]: Fix Invalid revision range error Oct 23, 2025
@EbonyLouis EbonyLouis requested a review from iandouglas October 23, 2025 15:58
@EbonyLouis EbonyLouis merged commit ee423c9 into main Oct 23, 2025
14 checks passed
@EbonyLouis EbonyLouis deleted the fix-api-key-flow branch October 23, 2025 16:11
wpfleger96 added a commit that referenced this pull request Oct 23, 2025
* main:
  Create recipe dir on save (#5337)
  docs: Update Discord link (#5335)
  [recipe workflow]: Fix `Invalid revision range` error  (#5334)
katzdave added a commit that referenced this pull request Oct 23, 2025
…message

# By Better-Boy (3) and others
# Via GitHub
* 'main' of github.com:block/goose:
  Create recipe dir on save (#5337)
  docs: Update Discord link (#5335)
  [recipe workflow]: Fix `Invalid revision range` error  (#5334)
  Add tech-article-explainer recipe (#5333)
  doc: added beta banner for old blog post (#5332)
  feat: add code refactor recipe (#5320)
  Security audit recipe (#5319)
  feat: add generate commit message recipe (#5326)
  fix: remove dependency on gsap library (#5330)
  feat: dynamically load ollama models (#5309)
  fix: skip temperature for goose-gpt-5 model (#5311)
  Replace compaction notifications with system notifications (#5218)

# Conflicts:
#	crates/goose/src/agents/agent.rs
michaelneale added a commit that referenced this pull request Oct 24, 2025
* main: (77 commits)
  Fix legacy import (#5343)
  Unify loading goose messages and usechatstream determines chat state (#5306)
  Docs: goose session export and goose session import (#5267)
  Create recipe dir on save (#5337)
  docs: Update Discord link (#5335)
  [recipe workflow]: Fix `Invalid revision range` error  (#5334)
  Add tech-article-explainer recipe (#5333)
  doc: added beta banner for old blog post (#5332)
  feat: add code refactor recipe (#5320)
  Security audit recipe (#5319)
  feat: add generate commit message recipe (#5326)
  fix: remove dependency on gsap library (#5330)
  feat: dynamically load ollama models (#5309)
  fix: skip temperature for goose-gpt-5 model (#5311)
  Replace compaction notifications with system notifications (#5218)
  Diagnostics (#5323)
  Fix gemini again (#5308)
  fix: synchronize local message state after conversation compaction (#5315)
  docs: replace broken links with working links (#5266)
  Add Web Accessibility Auditor recipe to cookbook (#5318)
  ...
BlairAllan pushed a commit to BlairAllan/goose that referenced this pull request Oct 25, 2025
michaelneale added a commit that referenced this pull request Oct 27, 2025
* main: (54 commits)
  fixing typo in blog metadata (#5382)
  feat: add new blog entry on adopting Goose in the enterprise (#5381)
  Blog/acp intro oct 2024 (#5379)
  feat: add A/B test framework generator recipe (#5378)
  Doc: (blog) - Deep Dive into goose's Extension System and Model Context Protocol (MCP) (#5291)
  Some system prompt tidying (#5313)
  Fix scheduler jobs dates formatting (#5368)
  Use Instructions as Prompt in Scheduler (#5359)
  feat(snowflake): add support for newer Claude 4.5 and 4 models (#5350)
  Add bottom menu extension selection (#5352)
  (re)Standardize Session Name Attribute (#5279)
  chore: improve timeout for entering password when running goose ui from source (#5349)
  Fix legacy import (#5343)
  Unify loading goose messages and usechatstream determines chat state (#5306)
  Docs: goose session export and goose session import (#5267)
  Create recipe dir on save (#5337)
  docs: Update Discord link (#5335)
  [recipe workflow]: Fix `Invalid revision range` error  (#5334)
  Add tech-article-explainer recipe (#5333)
  doc: added beta banner for old blog post (#5332)
  ...
BlairAllan pushed a commit to BlairAllan/goose that referenced this pull request Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants