Skip to content

Fix HTTP 404 in issue comment step due to missing issue_number#1055

Merged
pancetta merged 2 commits intosourcefrom
copilot/fix-trailing-comma-issue
Mar 13, 2026
Merged

Fix HTTP 404 in issue comment step due to missing issue_number#1055
pancetta merged 2 commits intosourcefrom
copilot/fix-trailing-comma-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

github.rest.issues.createComment (octokit v18+) builds the request URL from issue_number, not number. Spreading context.issue only provides {owner, repo, number}, leaving issue_number undefined and producing a malformed API URL (issues//comments), causing HTTP 404.

Changes

  • issue_to_bib.yml and arxiv_to_publications_correct.yml: replace ...context.issue with ...context.repo, issue_number: context.issue.number in the createComment call
// Before
github.rest.issues.createComment({...context.issue, body: process.env.COMMENT})

// After
github.rest.issues.createComment({...context.repo, issue_number: context.issue.number, body: process.env.COMMENT})

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Fix trailing comma in issue text/link Fix HTTP 404 in issue comment step due to missing issue_number Mar 13, 2026
Copilot AI requested a review from pancetta March 13, 2026 06:17
@pancetta
Copy link
Member

Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot Maybe this is about the double "//" in https://api.github.com/repos/Parallel-in-Time/parallel-in-time.github.io/issues//comments ?

Yes, exactly. ...context.issue spreads as {owner, repo, number}, but github.rest.issues.createComment builds the URL path from issue_number (not number), so issue_number was undefined → the URL became .../issues//comments.

Fixed in c6afc52 by replacing ...context.issue with ...context.repo, issue_number: context.issue.number.

@pancetta pancetta marked this pull request as ready for review March 13, 2026 06:20
@pancetta pancetta merged commit 968e176 into source Mar 13, 2026
2 checks passed
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