This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +49
-0
lines changed Expand file tree Collapse file tree 4 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ REPO_NAME=" iggy-rs/setup-iggy"
4
+ API_URL=" https://api.github.com/repos/$REPO_NAME /labels"
5
+
6
+ create_label () {
7
+ local name=" $1 "
8
+ local color=" $2 "
9
+ local description=" $3 "
10
+
11
+ curl -X POST -H " Authorization: token $GITHUB_TOKEN " -H " Accept: application/vnd.github.v3+json" \
12
+ -d ' {"name": "' " $name " ' ", "color": "' " $color " ' ", "description": "' " $description " ' "}' \
13
+ " $API_URL "
14
+ }
15
+
16
+ create_label " CI/CD" " 93ecdb" " Pull requests bring CI/CD improvements."
17
+ create_label " docs" " 0075ca" " Improvements or additions to documentation."
18
+ create_label " duplicate" " cfd3d7" " This issue or pull request already exists."
19
+ create_label " maintenance" " ed4d86" " Maintenance work."
20
+ create_label " semver:major" " 8151c5" " Label for pull request that brings a major (BREAKING) change."
21
+ create_label " semver:minor" " 8af85b" " Label for pull request that brings a minor change."
22
+ create_label " semver:patch" " fef2c0" " Label for pull request that brings a patch change."
Original file line number Diff line number Diff line change 41
41
42
42
- uses : actions/checkout@v4
43
43
with :
44
+ fetch-depth : 1
44
45
token : ${{ steps.app-token.outputs.token }}
45
46
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
46
47
persist-credentials : false
Original file line number Diff line number Diff line change 19
19
20
20
- uses : actions/checkout@v4
21
21
with :
22
+ fetch-depth : 1
22
23
token : ${{ steps.app-token.outputs.token }}
23
24
24
25
- name : Update CHANGELOG
Original file line number Diff line number Diff line change
1
+ name : Update repository labels
2
+ on :
3
+ pull_request :
4
+
5
+ jobs :
6
+ checks :
7
+ name : Update labels
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - name : Checkout Repository
12
+ uses : actions/checkout@v4
13
+ with :
14
+ fetch-depth : 1
15
+
16
+ - uses : actions/create-github-app-token@v1
17
+ id : app-token
18
+ with :
19
+ app-id : ${{ secrets.DEPLOY_APP_ID }}
20
+ private-key : ${{ secrets.DEPLOY_APP_KEY }}
21
+
22
+ - name : Call script
23
+ env :
24
+ GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
25
+ run : .github/update-labels.sh
You can’t perform that action at this time.
0 commit comments