Skip to content

fix(actions): add pull request write permission for ping spam workflow#473

Open
Nightkilller wants to merge 1 commit into
piyushdotcomm:mainfrom
Nightkilller:fix-ping-spam-permissions
Open

fix(actions): add pull request write permission for ping spam workflow#473
Nightkilller wants to merge 1 commit into
piyushdotcomm:mainfrom
Nightkilller:fix-ping-spam-permissions

Conversation

@Nightkilller
Copy link
Copy Markdown

@Nightkilller Nightkilller commented Jun 4, 2026

Summary

This PR fixes the detect-ping-spam workflow failing with:

HttpError: Resource not accessible by integration (403)

Root Cause

The workflow posts comments and applies labels on pull requests using the GitHub Issues API. However, the workflow only requested:

yaml permissions: issues: write contents: read

When operating on pull requests, GitHub requires the pull-requests: write permission.

Changes

Added the missing permission:

yaml permissions: issues: write pull-requests: write contents: read

Validation

  • Reviewed similar workflows in the repository (duplicate-pr.yml, label-sync.yml).
  • Confirmed they already request pull-requests: write for equivalent operations.
  • Ensures the workflow can create comments and manage labels on pull requests without triggering a 403 error.

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow permissions to support enhanced automation capabilities.

@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

👋 Thanks for opening a PR, @Nightkilller!

Your PR has entered the 🚦 PR Review Pipeline.

Standard PR detected — your PR will follow the standard review pipeline.


What happens next

Stage Reviewer Checks
Stage 1 — Automated Validation 🤖 Bot DCO · Format · AI/Slop · Duplicate
Stage 2 — Human Review 👥 Maintainer Code + Quality Review
Stage 3 — PA / Maintainer Review 🔑 Project Admin Final Merge Decision

A pipeline status comment will appear below and update automatically as your PR progresses.


While you wait

  • Sign all commits (git commit -s)
  • Link your issue (Closes #123)
  • Use a feature branch (not main)
  • Avoid unrelated changes

This comment is posted only once.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 45532a8c-bee9-4496-9366-47029be521a9

📥 Commits

Reviewing files that changed from the base of the PR and between f12b223 and 567ca19.

📒 Files selected for processing (1)
  • .github/workflows/detect-ping-spam.yml

Walkthrough

The detect-ping-spam workflow permissions are updated to grant pull-requests: write access, allowing the workflow to modify pull request state or content in addition to its existing issues and contents permissions.

Changes

Workflow Permissions Update

Layer / File(s) Summary
Pull-request write permission
.github/workflows/detect-ping-spam.yml
pull-requests: write is added to the workflow permissions, expanding GitHub API scope to enable pull request modifications.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A permission was granted with care,
To pull-requests we now dare,
One line scribed so clean,
Makes workflows pristine,
The spam-detector now fixes with flair!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding pull request write permission to the ping spam workflow.
Description check ✅ Passed The description provides a clear summary with root cause analysis and validation steps, though it doesn't follow the repository's template structure with checkboxes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant