Skip to content

fix (ci): upgrade probot version in CI#21670

Merged
deependujha merged 8 commits intoLightning-AI:masterfrom
deependujha:fix/ci-probot-comment
Apr 28, 2026
Merged

fix (ci): upgrade probot version in CI#21670
deependujha merged 8 commits intoLightning-AI:masterfrom
deependujha:fix/ci-probot-comment

Conversation

@deependujha
Copy link
Copy Markdown
Collaborator

@deependujha deependujha commented Apr 19, 2026

What does this PR do?

Fixes #<issue_number>

Problem

Probot fails to post comments on PRs opened from forks (example failing run). This is because the pull_request trigger runs with a read-only token for fork PRs, which doesn't have permission to write comments.

PRs from branches within the same repo are unaffected (example working comment).

Fix

Switch to pull_request_target, which runs in the context of the base repo and gets a read-write token. Probot only polls check statuses and posts comments; it never checks out PR code, so this is safe to do.

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--21670.org.readthedocs.build/en/21670/

@github-actions github-actions Bot added the ci Continuous Integration label Apr 19, 2026
@deependujha deependujha changed the title fix: allow comment posting on fork PRs fix (ci): allow comment posting on fork PRs Apr 19, 2026
@deependujha deependujha changed the title fix (ci): allow comment posting on fork PRs fix (ci): allow probot comment posting on fork PRs Apr 19, 2026
@deependujha deependujha requested a review from Copilot April 19, 2026 20:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Probot workflow trigger so Probot can post comments on pull requests opened from forks by running in the base repository context.

Changes:

  • Switch the workflow trigger from pull_request to pull_request_target.
  • Add an inline note explaining why the trigger change is considered safe for this workflow.
Comments suppressed due to low confidence (1)

.github/workflows/probot-check-group.yml:9

  • With pull_request_target, github.ref is the base branch ref and github.head_ref is only the source branch name (not fork-qualified), so the current concurrency group can collide across different fork PRs that use the same branch name, causing unrelated runs to cancel each other. Consider using a unique key like the PR number (github.event.pull_request.number) in the concurrency group.
  pull_request_target:
    types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/probot-check-group.yml Outdated
Comment thread .github/workflows/probot-check-group.yml Outdated
@deependujha deependujha enabled auto-merge (squash) April 28, 2026 08:50
@deependujha deependujha merged commit 0e20e15 into Lightning-AI:master Apr 28, 2026
13 of 15 checks passed
@deependujha deependujha deleted the fix/ci-probot-comment branch April 28, 2026 17:35
@deependujha
Copy link
Copy Markdown
Collaborator Author

update: upgrading to probot v5.5 fixed the issue, without requiring pull_request_target, hence dropped it. Still unable to comment on fork prs, but it isn't very necessary either.

@deependujha deependujha changed the title fix (ci): allow probot comment posting on fork PRs fix (ci): upgrade probot version in CI Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants