Skip to content

Prevent issue-translator from running on PR comments#1477

Merged
eXeLearningProject merged 2 commits intomainfrom
hotfix/avoid-error-on-comment-translator
Mar 7, 2026
Merged

Prevent issue-translator from running on PR comments#1477
eXeLearningProject merged 2 commits intomainfrom
hotfix/avoid-error-on-comment-translator

Conversation

@erseco
Copy link
Copy Markdown
Collaborator

@erseco erseco commented Mar 7, 2026

The issue-translator GitHub Actions workflow is triggered by issue_comment events. In GitHub, this event is fired for both issue comments and pull request comments.

This currently causes two problems:

  1. The workflow runs unnecessarily on pull request comments, such as deployment bot messages.
  2. It fails with Resource not accessible by integration because the workflow only has issues: write permission and not pull-requests: write.

Changes

File: .github/workflows/issue-translator.yml

This PR introduces two small changes:

  • Add a job-level condition to skip comments made on pull requests:
if: ${{ !github.event.issue.pull_request }}

GitHub sets github.event.issue.pull_request when the comment belongs to a pull request. This ensures the workflow only runs for actual issue comments and issue creation events.

  • Add cloudflare-workers-and-pages[bot] to SKIP_ACTORS to prevent translating deployment bot comments in the unlikely event they appear on issues.

Verification

  • Validate that the workflow YAML is correct.

  • Confirm that github.event.issue.pull_request is:

    • defined for pull request comments
    • undefined for issue comments

This ensures the workflow only runs where it is intended.

@erseco erseco requested a review from ignaciogros March 7, 2026 12:31
@erseco erseco self-assigned this Mar 7, 2026
@erseco erseco changed the title Prevent issue-translator from running on PR comments* Prevent issue-translator from running on PR comments Mar 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.54%. Comparing base (592058b) to head (c62163f).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1477      +/-   ##
==========================================
- Coverage   90.54%   90.54%   -0.01%     
==========================================
  Files         337      337              
  Lines       72116    72147      +31     
==========================================
+ Hits        65295    65323      +28     
- Misses       6821     6824       +3     
Flag Coverage Δ
frontend 90.54% <ø> (-0.01%) ⬇️
unittests 90.54% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Bundle Report

Bundle size has no change ✅

@erseco erseco temporarily deployed to hotfix/avoid-error-on-comment-translator - exelearning PR #1477 March 7, 2026 13:01 — with Render Destroyed
@eXeLearningProject eXeLearningProject merged commit d683b85 into main Mar 7, 2026
4 checks passed
@eXeLearningProject eXeLearningProject deleted the hotfix/avoid-error-on-comment-translator branch March 7, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants