Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new GitHub Actions workflow titled "Second Reviewer Assignment." The primary objective of this workflow is to automate the process of assigning a second reviewer to pull requests when required, as part of our tie-breaker mechanism in code review processes.
Key Features:
Trigger Condition: The workflow is triggered when a label named
PR: second reviewer
is added to a pull request. It is designed to only respond to this specific label, ensuring that the action is executed intentionally and in the appropriate context.Fetching Reviewers: The workflow fetches the list of potential reviewers from the 'reviewers' team within the 'Tribler' GitHub organization. This is done using the
actions/github-script
action with a custom script.Reviewer Assignment Logic:
Commenting on PR: After assigning the reviewer, the workflow automatically posts a comment on the pull request, explaining the selection. This comment serves to inform all participants about the automated decision and its context.
Handling Unavailability of Reviewers: In case all potential reviewers are already assigned, the workflow adds a comment to the pull request stating that all eligible reviewers have been exhausted. This serves as a notification for manual intervention.
Usage of PAT Token: A Personal Access Token (PAT) titled
PAT_TOKEN_FOR_SECOND_REVIEWER_UNTIL_JAN_2025
is used due to the insufficient permissions of the default GitHub token for viewing members of the Tribler organization. This token is valid until January 2025 and will need to be replaced upon expiration.Additional Notes:
PAT_TOKEN_FOR_SECOND_REVIEWER_UNTIL_JAN_2025
will expire in January 2025. A renewal or replacement will be necessary to maintain the functionality of this workflow.Modifications:
.github/workflows/second_reviewer_assignment.yml
file implementing the workflow.Resolves #7807
Refs: