Skip to content

fix: Skip syncing PRs from collaborators and organization members#105

Merged
kumekay merged 1 commit intov1from
fix/users
Feb 13, 2026
Merged

fix: Skip syncing PRs from collaborators and organization members#105
kumekay merged 1 commit intov1from
fix/users

Conversation

@kumekay
Copy link
Copy Markdown
Collaborator

@kumekay kumekay commented Feb 12, 2026

Fixes an issue where PRs from GitHub Team Members and collaborators were still being synced to Jira when they should be ignored.
Root Cause
The previous implementation used repo.has_in_collaborators() which only checks for direct repository collaborators. It did not detect:

  • Organization members (public or private)
  • Team members with repo access
    This caused PRs from internal team members to be incorrectly synced to Jira.
    Changes
  • Added _is_collaborator_or_org_member() helper function that checks both:
    • Direct collaborators via repo.has_in_collaborators()
    • Organization members via org.has_in_members() (works for both public and private members)
  • Updated both sync paths:
    • sync_pr.py - cron job PR sync
    • sync_to_jira.py - event-based PR sync
  • Added clear log messages indicating why a PR was skipped:
  • Added tests for both skip scenarios

@kumekay kumekay requested a review from a team as a code owner February 12, 2026 18:03
@kumekay kumekay requested review from tomassebestik and removed request for a team February 12, 2026 18:03
@github-actions
Copy link
Copy Markdown

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello kumekay, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against c30cebd

@kumekay kumekay requested a review from hfudev February 12, 2026 18:04
Copy link
Copy Markdown
Member

@tomassebestik tomassebestik left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you

Copy link
Copy Markdown
Member

@hfudev hfudev left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you

@kumekay kumekay merged commit 804d28c into v1 Feb 13, 2026
3 checks passed
@kumekay kumekay deleted the fix/users branch February 13, 2026 22:19
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