Test PR 1: Modify workflow name #114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Check Potential Conflicts - Test PR 1" | |
on: | |
pull_request_target: | |
pull_request_review: | |
types: [submitted] | |
permissions: | |
contents: read | |
pull-requests: write | |
# Enforce other not needed permissions are off | |
actions: none | |
checks: none | |
deployments: none | |
issues: none | |
packages: none | |
repository-projects: none | |
security-events: none | |
statuses: none | |
jobs: | |
predict_conflicts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check for potential conflicts | |
id: check_conflicts | |
uses: PastaPastaPasta/[email protected] | |
with: | |
ghToken: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: validate potential conflicts | |
id: validate_conflicts | |
run: pip3 install hjson && .github/workflows/handle_potential_conflicts.py "$conflicts" | |
continue-on-error: true | |
- name: Post conflict comment | |
if: steps.validate_conflicts.outputs.has_conflicts == 'true' | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message-id: conflict-prediction | |
message: | | |
## ⚠️ Potential Merge Conflicts Detected | |
This PR has potential conflicts with the following open PRs: | |
${{ steps.validate_conflicts.outputs.conflict_details }} | |
Please coordinate with the authors of these PRs to avoid merge conflicts. | |
- name: Remove conflict comment if no conflicts | |
if: steps.validate_conflicts.outputs.has_conflicts == 'false' | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message-id: conflict-prediction | |
message: | | |
## ✅ No Merge Conflicts Detected | |
This PR currently has no conflicts with other open PRs. | |
- name: Fail if conflicts exist | |
if: steps.validate_conflicts.outputs.has_conflicts == 'true' | |
run: exit 1 |