Skip to content

fix(ci): close_issue workflow failure - #442

Merged
BeyondMagic merged 2 commits into
mainfrom
copilot/fix-close-issue-job-failure
Nov 4, 2026
Merged

BeyondMagic merged 2 commits into
mainfrom
copilot/fix-close-issue-job-failure

Conversation

Copilot AI commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

The close_issue Actions job failed when closing merged theme submission issues because gh attempted to resolve repository context from .git, which is unavailable in this checkout-free job. This update removes that implicit dependency so issue lookup/close works reliably.

  • Root cause

    • gh issue view / gh issue close were invoked without explicit repository targeting in a workflow step that does not run actions/checkout.
  • Workflow change

    • Added GH_REPO: ${{ github.repository }} to step environment.
    • Passed --repo "$GH_REPO" to all gh issue commands in the job.
  • Resulting behavior

    • The job now resolves repository context from workflow metadata instead of local git state, preventing fatal: not a git repository failures.
env:
  GH_TOKEN: ${{ github.token }}
  GH_REPO: ${{ github.repository }}

issue_state="$(gh issue view "$issue_number" --repo "$GH_REPO" --json state --jq .state)"
gh issue close "$issue_number" --repo "$GH_REPO" \
  --comment "Theme submission was merged in #${PR_NUMBER}. Thanks for sharing it."

Co-authored-by: BeyondMagic <51831435+BeyondMagic@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job close_issue Fix close_issue workflow failure by making gh repo resolution explicit Nov 4, 2026
Copilot AI requested a review from BeyondMagic November 4, 2026 22:16
@BeyondMagic
BeyondMagic marked this pull request as ready for review November 4, 2026 22:19
@BeyondMagic BeyondMagic changed the title Fix close_issue workflow failure by making gh repo resolution explicit fix(ci): close_issue workflow failure Nov 4, 2026
@BeyondMagic
BeyondMagic merged commit 23cc10c into main Nov 4, 2026
2 checks passed
@BeyondMagic
BeyondMagic deleted the copilot/fix-close-issue-job-failure branch November 4, 2026 22:20
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.

2 participants