File tree Expand file tree Collapse file tree 3 files changed +94
-0
lines changed Expand file tree Collapse file tree 3 files changed +94
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+
3+ # The workflow template for automatic PR labeler.
4+ # It requires to have a configuration file with labels and conditions to apply them.
5+ # The configuration file should be placed in the .github folder and named auto-labeler-config.yaml.
6+ # Example file can be found there:
7+ # https://github.com/Netcracker/.github/blob/main/config/examples/auto-labeler-config.yaml
8+
9+ name : Automatic PR Labeler
10+
11+ on :
12+ pull_request :
13+ branches : [main]
14+ types :
15+ [opened, reopened, synchronize]
16+
17+ permissions :
18+ pull-requests : write
19+ contents : read
20+ issues : write
21+
22+ jobs :
23+ assign-labels :
24+ if : github.event.pull_request.merged == false
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v4
28+
29+ - name : " Execute assign labels"
30+ id : action-assign-labels
31+ uses : mauroalderete/action-assign-labels@v1
32+ with :
33+ pull-request-number : ${{ github.event.pull_request.number }}
34+ github-token : ${{ github.token }}
35+ conventional-commits : " ./.github/auto-labeler-config.yaml"
36+ maintain-labels-not-matched : true
37+ apply-changes : ${{ github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
38+ - name : " Drop warning if PR from fork"
39+ if : ${{ github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id }}
40+ run : |
41+ echo "⚠️ Pull request from fork! ⚠️" >> $GITHUB_STEP_SUMMARY
42+ echo "Labels will not be applied to PR. Assign them manually please." >> $GITHUB_STEP_SUMMARY
43+ echo "Labels to assign: ${{ steps.action-assign-labels.outputs.labels-next }}" >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change 1+ ---
2+
3+ name : " Add commit messages to PR body"
4+
5+ on :
6+ pull_request :
7+ types : [opened, synchronize]
8+
9+ permissions :
10+ pull-requests : write
11+
12+ jobs :
13+ update-pr-body :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : " Update PR body"
17+ if : ${{ github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
18+ uses : netcracker/qubership-workflow-hub/actions/pr-add-messages@main
19+ - name : " Warning"
20+ if : ${{ github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}
21+ run : |
22+ echo "⚠️ Pull request from fork! ⚠️" >> $GITHUB_STEP_SUMMARY
23+ echo "Can not change PR body." >> $GITHUB_STEP_SUMMARY
24+
Original file line number Diff line number Diff line change 1+ ---
2+ name : Profanity filter
3+
4+ on :
5+ issue_comment :
6+ types : [created, edited]
7+ issues :
8+ types : [opened, edited, reopened]
9+ pull_request :
10+ types : [opened, edited, reopened]
11+
12+ permissions :
13+ issues : write
14+ pull-requests : write
15+
16+ jobs :
17+ call-apply-filter :
18+ if : ${{ github.event_name == 'issue_comment' || github.event_name == 'issues' || (github.event_name == 'pull_request' && github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id) }}
19+ uses : Netcracker/qubership-workflow-hub/.github/workflows/profanityFilter.yaml@main
20+ warning :
21+ runs-on : ubuntu-latest
22+ if : ${{ github.event_name == 'pull_request' && github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id }}
23+ steps :
24+ - name : " Warning"
25+ run : |
26+ echo "⚠️ Pull request from fork! ⚠️" >> $GITHUB_STEP_SUMMARY
27+ echo "The action cannot be run over PRs from fork." >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments