Skip to content

Commit a3ddf87

Browse files
Copilotv1v
andauthored
Replace tibdex/github-app-token with actions/create-github-app-token (#357)
* Initial plan * Initial repository exploration and plan for replacing tibdex/github-app-token Co-authored-by: v1v <[email protected]> * Replace tibdex/github-app-token with actions/create-github-app-token in all workflows Co-authored-by: v1v <[email protected]> * Apply suggestions from code review * Update .github/workflows/pre-post-release.yml * Remove unrelated license headers from Java test files Co-authored-by: v1v <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: v1v <[email protected]> Co-authored-by: Victor Martinez <[email protected]>
1 parent d7a311d commit a3ddf87

File tree

4 files changed

+24
-36
lines changed

4 files changed

+24
-36
lines changed

.github/workflows/addToProject.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ jobs:
1515
steps:
1616
- name: Get token
1717
id: get_token
18-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
18+
uses: actions/create-github-app-token@v2
1919
with:
20-
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
21-
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
22-
permissions: >-
23-
{
24-
"organization_projects": "write",
25-
"issues": "read"
26-
}
20+
app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
21+
private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
22+
permission-organization-projects: write
23+
permission-issues: read
2724

2825
- name: Assign issues with milestones to project
2926
uses: elastic/[email protected]

.github/workflows/labeler.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@ jobs:
1717

1818
- name: Get token
1919
id: get_token
20-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
20+
uses: actions/create-github-app-token@v2
2121
with:
22-
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
23-
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
24-
permissions: >-
25-
{
26-
"members": "read",
27-
"organization_projects": "write",
28-
"issues": "read",
29-
"pull_requests": "write"
30-
}
22+
app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
23+
private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
24+
permission-members: read
25+
permission-organization-projects: write
26+
permission-issues: read
27+
permission-pull-requests: write
3128

3229
- name: Add agent-java label
3330
run: gh issue edit "${NUMBER}" --add-label "agent-java" --repo "${{ github.repository }}"

.github/workflows/pre-post-release.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,14 @@ jobs:
5454
steps:
5555
- name: Get token
5656
id: get_token
57-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
57+
uses: actions/create-github-app-token@v2
5858
with:
59-
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
60-
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
61-
permissions: >-
62-
{
63-
"contents": "write",
64-
"pull_requests": "write"
65-
}
66-
repositories: >-
67-
["ecs-logging-java"]
59+
app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
60+
private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
61+
permission-contents: write
62+
permission-pull-requests: write
63+
repositories: |
64+
ecs-logging-java
6865
6966
- uses: actions/checkout@v5
7067
with:

.github/workflows/updatecli.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,12 @@ jobs:
1919

2020
- name: Get token
2121
id: get_token
22-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
22+
uses: actions/create-github-app-token@v2
2323
with:
24-
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
25-
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
26-
permissions: >-
27-
{
28-
"contents": "write",
29-
"pull_requests": "write"
30-
}
24+
app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
25+
private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
26+
permission-contents: write
27+
permission-pull-requests: write
3128

3229
- uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
3330
with:

0 commit comments

Comments
 (0)