Skip to content

Add a fallback when fork tokens cannot post comments - #104

Draft
Pybsama wants to merge 1 commit into
github:mainfrom
Pybsama:codex/fallback-when-comment-forbidden
Draft

Add a fallback when fork tokens cannot post comments#104
Pybsama wants to merge 1 commit into
github:mainfrom
Pybsama:codex/fallback-when-comment-forbidden

Conversation

@Pybsama

@Pybsama Pybsama commented Jul 31, 2026

Copy link
Copy Markdown

Summary

  • catch the known Resource not accessible by integration error when a fork workflow token cannot create or update a comment
  • emit a GitHub warning and log the complete comment that would have been posted
  • add the same message to the Actions Job Summary when it is available
  • preserve the original exit code and stderr for every other command failure
  • route all seven PR, Issue, and Discussion create/update paths through the fallback
  • make top-level Discussion comments use the helper's explicit ID and message arguments

Fixes #44.

Testing

  • added Bash subprocess tests for success, the known fork permission error, unexpected failures, multiline argument preservation, and top-level Discussion parameters
  • confirmed the fallback tests fail against the previous implementation before the helper exists
  • npm ci && npm test — 10 tests passed
  • focused test file repeated 20 times
  • bash -n queries.sh
  • parsed action.yml with js-yaml
  • git diff --check

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.

🐛 Bug: No fallback behavior for action runs on forks

1 participant