forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: comment on PR when there are potential conflicts
- Loading branch information
1 parent
fc43fd1
commit 6ef833f
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,25 @@ jobs: | |
uses: PastaPastaPasta/[email protected] | ||
with: | ||
ghToken: "${{ secrets.GITHUB_TOKEN }}" | ||
id: conflicts-check | ||
|
||
- name: validate potential conflicts | ||
run: wget https://raw.githubusercontent.com/dashpay/dash/develop/.github/workflows/handle_potential_conflicts.py && pip3 install hjson && python3 handle_potential_conflicts.py "$conflicts" | ||
env: | ||
conflicts: ${{ steps.conflicts-check.output }} | ||
|
||
- name: comment on PR if there are conflicting PRs | ||
if: steps.conflicts-check.outputs.conflictingPrs != '' | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
const prNumber = context.payload.pull_request.number; | ||
const conflictingPrs = `${{ steps.conflicts-check.outputs.conflictingPrs }}`; | ||
const comment = `Conflicting PRs: ${conflictingPrs}`; | ||
await github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: prNumber, | ||
body: comment, | ||
}); | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |