File tree Expand file tree Collapse file tree 4 files changed +44
-3
lines changed
.github/rn-pr-labeler-action Expand file tree Collapse file tree 4 files changed +44
-3
lines changed Original file line number Diff line number Diff line change 1+ name : " rn-pr-labeler"
2+ author : " @gmuloc"
3+ description : " Parse a conventional commit compliant PR title and add it as a label to the PR with the prefix 'rn: '"
4+ inputs :
5+ auto_create_label :
6+ description : " Boolean to indicate if the label should be auto created"
7+ required : false
8+ default : false
9+ runs :
10+ using : " composite"
11+ steps :
12+ - name : ' Looking up existing "rn:" label'
13+ run : |
14+ echo "OLD_LABEL=$(gh pr view ${{ github.event.pull_request.number }} --json labels -q .labels[].name | grep 'rn: ')" >> $GITHUB_ENV
15+ shell : bash
16+ - name : ' Delete existing "rn:" label if found'
17+ run : gh pr edit ${{ github.event.pull_request.number }} --remove-label "${{ env.OLD_LABEL }}"
18+ shell : bash
19+ if : ${{ env.OLD_LABEL }}
20+ - name : Set Label
21+ # Using toJSON to support ' and " in commit messages
22+ # https://stackoverflow.com/questions/73363167/github-actions-how-to-escape-characters-in-commit-message
23+ run : echo "LABEL=$(echo ${{ toJSON(github.event.pull_request.title) }} | cut -d ':' -f 1 | tr -d ' ' | tr ',' '|')" >> $GITHUB_ENV
24+ shell : bash
25+ # an alternative to verifying if the target label already exist is to
26+ # create the label with --force in the next step, it will keep on changing
27+ # the color of the label though so it may not be desirable.
28+ - name : Check if label exist
29+ run : |
30+ EXIST=$(gh label list -L 100 --search "rn:" --json name -q '.[] | select(.name=="rn: ${{ env.LABEL }}").name')
31+ echo "EXIST=$EXIST" >> $GITHUB_ENV
32+ shell : bash
33+ - name : Create Label if auto-create and label does not exist already
34+ run : |
35+ gh label create "rn: ${{ env.LABEL }}"
36+ shell : bash
37+ if : ${{ inputs.auto_create_label && ! env.EXIST }}
38+ - name : Labelling PR
39+ run : |
40+ gh pr edit ${{ github.event.pull_request.number }} --add-label "rn: ${{ env.LABEL }}"
41+ shell : bash
Original file line number Diff line number Diff line change 11[workspace ]
2- package.version = " 0.0.1-dev2 "
2+ package.version = " 0.0.1-dev3 "
33package.license = " Apache-2.0"
44
55members = [
Original file line number Diff line number Diff line change 77__author__ = "Arista Networks"
88__copyright__ = "Copyright 2025 Arista Networks"
99__license__ = "Apache 2.0"
10- __version__ = "0.0.1.dev2 "
10+ __version__ = "0.0.1.dev3 "
1111
1212__all__ = ["passwords" , "validation" ]
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ exclude_also = [
217217
218218[tool .bumpversion ]
219219
220- current_version = " 0.0.1-dev2 "
220+ current_version = " 0.0.1-dev3 "
221221
222222allow_dirty = true
223223commit = false
You can’t perform that action at this time.
0 commit comments