Skip to content

ci: update conflict predictor comment action#7316

Merged
PastaPastaPasta merged 3 commits into
dashpay:developfrom
thepastaclaw:fix-predict-conflicts-comment-permission
May 12, 2026
Merged

ci: update conflict predictor comment action#7316
PastaPastaPasta merged 3 commits into
dashpay:developfrom
thepastaclaw:fix-predict-conflicts-comment-permission

Conversation

@thepastaclaw
Copy link
Copy Markdown

PR Body

Summary

  • Update mshick/add-pr-comment from v2 to v3 in the
    predict-conflicts workflow.
  • Keep the existing least-privilege workflow permissions unchanged.
  • Align predict-conflicts with the already-updated merge-check workflow
    comment action.

Motivation

Several draft PRs are showing red predict_conflicts jobs where the conflict
check itself succeeds, but the sticky PR comment step fails with:

Resource not accessible by integration

The sibling merge-check workflow already uses mshick/add-pr-comment@v3 under
pull-requests: write, so this brings predict-conflicts onto the same action
version without broadening the token scope.

Validation

  • git diff --check
  • Pre-PR code review gate passed:
    Code review was run against upstream/develop and the feature branch.
    Result: no significant issues found; recommendation: ship.
  • Inspected failing workflow logs for authored PRs showing failures in
    mshick/add-pr-comment@v2 with Resource not accessible by integration.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

@thepastaclaw
Copy link
Copy Markdown
Author

thepastaclaw commented May 9, 2026

✅ Review complete (commit 5d0c7d1)

@thepastaclaw
Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: be34a24b-f4f0-477c-a92a-4f4a63c338fe

📥 Commits

Reviewing files that changed from the base of the PR and between 0e78944 and 5d0c7d1.

📒 Files selected for processing (1)
  • .github/workflows/predict-conflicts.yml

Walkthrough

The PR updates .github/workflows/predict-conflicts.yml: job-level permissions now grant issues: write (was none), and both the "Post conflict comment" and "Remove conflict comment if no conflicts" steps upgrade mshick/add-pr-comment from @v2 to @v3 and add continue-on-error: true. Conditions and comment contents/IDs are unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • dashpay/dash#7316: Modifies the same workflow and upgrades mshick/add-pr-comment to @v3.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: updating the GitHub Action version in the conflict predictor workflow.
Description check ✅ Passed The description is well-related to the changeset, providing clear context about updating mshick/add-pr-comment from v2 to v3 and explaining the motivation and validation.
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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

Copy link
Copy Markdown
Author

@thepastaclaw thepastaclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Minimal CI workflow change: bumps mshick/add-pr-comment from v2 to v3 at two call sites in .github/workflows/predict-conflicts.yml, aligning with the sibling merge-check.yml workflow that already uses v3. The message-id/message inputs and pull-requests: write permission are unchanged and remain supported in v3. No correctness, security, or consensus concerns.

Reviewed commit: 0e78944

Copy link
Copy Markdown
Author

@thepastaclaw thepastaclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

CI-only change: bumps mshick/add-pr-comment to v3 and adds issues: write to the workflow's least-privilege permission set with an inline justification comment. The action bump is consistent with sibling merge-check.yml. The permission expansion is the only point worth a brief note — sibling workflow runs v3 with just pull-requests: write, but it does not use sticky message-id updates. No blocking issues.

Reviewed commit: 3c5105c

🟡 1 suggestion(s)

🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `.github/workflows/predict-conflicts.yml`:
- [SUGGESTION] line 11: Inconsistent permission scope vs. sibling merge-check.yml
  This workflow now grants `issues: write` (was `issues: none`) with the rationale that `mshick/add-pr-comment` updates PR comments via the Issues API. However, `.github/workflows/merge-check.yml` uses the same `mshick/add-pr-comment@v3` with only `pull-requests: write` and posts PR comments successfully. In GitHub's permission model, PR comments are accessible via either `pull-requests: write` or `issues: write` since they share the `/issues/{n}/comments` endpoint, so `pull-requests: write` should normally be sufficient. The plausible difference here is the use of `message-id: conflict-prediction` for sticky comment updates, which may exercise a code path in v3 that the simple post-once usage in `merge-check.yml` does not. If a concrete v3 failure was observed without `issues: write`, a one-line note linking to the failing run (or to a v2→v3 migration note) in the comment would harden the justification. Otherwise, dropping `issues: write` to match the rest of the repo and the PR description's stated least-privilege intent would be cleaner. Not blocking — over-granting `issues: write` on a PR-only workflow is low-risk.

permissions:
contents: read
pull-requests: write
issues: write # mshick/add-pr-comment updates PR conversation comments via the Issues API
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: Inconsistent permission scope vs. sibling merge-check.yml

This workflow now grants issues: write (was issues: none) with the rationale that mshick/add-pr-comment updates PR comments via the Issues API. However, .github/workflows/merge-check.yml uses the same mshick/add-pr-comment@v3 with only pull-requests: write and posts PR comments successfully. In GitHub's permission model, PR comments are accessible via either pull-requests: write or issues: write since they share the /issues/{n}/comments endpoint, so pull-requests: write should normally be sufficient. The plausible difference here is the use of message-id: conflict-prediction for sticky comment updates, which may exercise a code path in v3 that the simple post-once usage in merge-check.yml does not. If a concrete v3 failure was observed without issues: write, a one-line note linking to the failing run (or to a v2→v3 migration note) in the comment would harden the justification. Otherwise, dropping issues: write to match the rest of the repo and the PR description's stated least-privilege intent would be cleaner. Not blocking — over-granting issues: write on a PR-only workflow is low-risk.

source: ['claude']

🤖 Fix this with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `.github/workflows/predict-conflicts.yml`:
- [SUGGESTION] line 11: Inconsistent permission scope vs. sibling merge-check.yml
  This workflow now grants `issues: write` (was `issues: none`) with the rationale that `mshick/add-pr-comment` updates PR comments via the Issues API. However, `.github/workflows/merge-check.yml` uses the same `mshick/add-pr-comment@v3` with only `pull-requests: write` and posts PR comments successfully. In GitHub's permission model, PR comments are accessible via either `pull-requests: write` or `issues: write` since they share the `/issues/{n}/comments` endpoint, so `pull-requests: write` should normally be sufficient. The plausible difference here is the use of `message-id: conflict-prediction` for sticky comment updates, which may exercise a code path in v3 that the simple post-once usage in `merge-check.yml` does not. If a concrete v3 failure was observed without `issues: write`, a one-line note linking to the failing run (or to a v2→v3 migration note) in the comment would harden the justification. Otherwise, dropping `issues: write` to match the rest of the repo and the PR description's stated least-privilege intent would be cleaner. Not blocking — over-granting `issues: write` on a PR-only workflow is low-risk.

Copy link
Copy Markdown
Author

@thepastaclaw thepastaclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

CI-only change bumping mshick/add-pr-comment from v2 to v3 in .github/workflows/predict-conflicts.yml, adding issues: write (with inline justification for the v3 sticky-comment code path) and continue-on-error: true on both comment steps so a comment failure doesn't fail the job. No correctness, security, or consensus concerns. One low-signal nitpick about whether the new permission is actually required.

Reviewed commit: 5d0c7d1

💬 1 nitpick(s)

permissions:
contents: read
pull-requests: write
issues: write # mshick/add-pr-comment updates PR conversation comments via the Issues API
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 Nitpick: issues: write may not be required; sibling workflow runs v3 with only pull-requests: write

The sibling .github/workflows/merge-check.yml uses mshick/add-pr-comment@v3 successfully with only pull-requests: write. The likely reason this workflow needs more is the message-id: conflict-prediction sticky-update path, which appears to exercise the Issues API in v3 — that matches the inline comment. If that was confirmed empirically (e.g., a failing run without issues: write), the justification is sufficient and this can be ignored. Otherwise, dropping it would match the rest of the repo's least-privilege posture. With continue-on-error: true now on both comment steps, this is purely cosmetic. Not blocking.

source: ['claude']

@PastaPastaPasta PastaPastaPasta marked this pull request as ready for review May 12, 2026 14:38
@PastaPastaPasta PastaPastaPasta merged commit beca567 into dashpay:develop May 12, 2026
46 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d0c7d1c77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

permissions:
contents: read
pull-requests: write
issues: write # mshick/add-pr-comment updates PR conversation comments via the Issues API
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid granting Issues write to the whole job

Because this workflow runs on pull_request_target / pull_request_review, this line gives every third-party action in the job, including PastaPastaPasta/potential-conflicts-checker-action@v0.1.10, a token that can write repository issues. GitHub's REST docs for creating/updating issue comments state that Pull requests write is accepted as an alternative to Issues write, and mshick/add-pr-comment@v3 documents only pull-requests: write for PR comments, so the existing permission should be sufficient without broadening the job-wide token scope.

Useful? React with 👍 / 👎.

@UdjinM6 UdjinM6 added this to the 24 milestone May 12, 2026
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.

3 participants