Skip to content

Fix PR comment scripts failing builds on permission denied - #329

Merged
litlfred merged 1 commit into
mainfrom
claude/fix-pr-comment-permissions-DU2jk
Mar 24, 2026
Merged

Fix PR comment scripts failing builds on permission denied#329
litlfred merged 1 commit into
mainfrom
claude/fix-pr-comment-permissions-DU2jk

Conversation

@litlfred

Copy link
Copy Markdown
Collaborator

Summary

  • Fix 403 errors crashing builds in downstream repos: When repos like smart-pcmt-vaxprequal call ghbuild.yml without pull-requests: write permission, the PR comment scripts got a 403 Forbidden and called sys.exit(1), failing the entire build
  • Handle 401/403 gracefully: Both pr_comment_start.py and pr_comment_finish.py now print a warning and continue instead of exiting with error code 1
  • Add continue-on-error: true to both PR comment workflow steps in ghbuild.yml as a safety net — PR comments are informational and should never block the build

Test plan

  • Trigger a build on a downstream repo (e.g. smart-pcmt-vaxprequal) with a PR and verify the build no longer fails on the PR comment step
  • Trigger a build on smart-base itself with a PR and verify PR comments still post successfully when permissions are correct
  • Verify the warning message appears in the workflow log when permissions are insufficient

https://claude.ai/code/session_01R8Qifz4vasB9Yn7CRzhWPa

When downstream repos call ghbuild.yml without pull-requests: write
permission, the PR comment scripts received a 403 Forbidden error and
called sys.exit(1), failing the entire build. PR comments are
informational and should never block the build.

Changes:
- Handle 401/403 errors gracefully in both pr_comment_start.py and
  pr_comment_finish.py (warn and continue instead of exit 1)
- Add continue-on-error: true to both PR comment workflow steps as
  a safety net

https://claude.ai/code/session_01R8Qifz4vasB9Yn7CRzhWPa
@github-actions

github-actions Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

✅ Deployment Successful

Branch: claude/fix-pr-comment-permissions-DU2jk
Commit: 96b3879
Deployed to: https://WorldHealthOrganization.github.io/smart-base/branches/fix-pr-comment-permissions-DU2jk

🌐 Open Preview
🔍 View Build Log


Deployment completed successfully! The site is now live at the URL above.

@github-actions

github-actions Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

✅ Deployment Successful

Branch: claude/fix-pr-comment-permissions-DU2jk
Commit: 3b3f950
Deployed to: https://WorldHealthOrganization.github.io/smart-base/branches/fix-pr-comment-permissions-DU2jk

🌐 Open Preview
🔍 View Build Log


Deployment completed successfully! The site is now live at the URL above.

@github-actions

github-actions Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

✅ Deployment Successful

Branch: claude/fix-pr-comment-permissions-DU2jk
Commit: 3b3f950
Deployed to: https://WorldHealthOrganization.github.io/smart-base/branches/fix-pr-comment-permissions-DU2jk

🌐 Open Preview
🔍 View Build Log


Deployment completed successfully! The site is now live at the URL above.

@litlfred
litlfred merged commit 2f4cdd5 into main Mar 24, 2026
10 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