Commits

yingjin authored and GitHub committed 56db9d86396 Merge
Merge branch 'DSpace:main' into DA-1767
No tags
gidlmaster

.github/workflows/label_merge_conflicts.yml

Modified
1 1 # This workflow checks open PRs for merge conflicts and labels them when conflicts are found
2 2 name: Check for merge conflicts
3 3
4 4 # Run whenever the "main" branch is updated
5 5 # NOTE: This means merge conflicts are only checked for when a PR is merged to main.
6 6 on:
7 7 push:
8 - branches:
9 - - main
8 + branches: [ main ]
9 + # So that the `conflict_label_name` is removed if conflicts are resolved,
10 + # we allow this to run for `pull_request_target` so that github secrets are available.
11 + pull_request_target:
12 + types: [ synchronize ]
10 13
11 14 jobs:
12 15 triage:
16 + # Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
17 + if: github.repository == 'dspace/dspace-angular'
13 18 runs-on: ubuntu-latest
19 + permissions:
20 + issues: write
21 + pull-requests: write
14 22 steps:
15 - # See: https://github.com/mschilde/auto-label-merge-conflicts/
23 + # See: https://github.com/prince-chrismc/label-merge-conflicts-action
16 24 - name: Auto-label PRs with merge conflicts
17 - uses: mschilde/auto-label-merge-conflicts@v2.0
25 + uses: prince-chrismc/label-merge-conflicts-action@v2
18 26 # Add "merge conflict" label if a merge conflict is detected. Remove it when resolved.
19 27 # Note, the authentication token is created automatically
20 28 # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
21 29 with:
22 - CONFLICT_LABEL_NAME: 'merge conflict'
23 - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 - # Ignore errors
25 - continue-on-error: true
30 + conflict_label_name: 'merge conflict'
31 + github_token: ${{ secrets.GITHUB_TOKEN }}
32 + conflict_comment: |
33 + Hi @${author},
34 + Conflicts have been detected against the base branch.
35 + Please [resolve these conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts) as soon as you can. Thanks!

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut