Skip to content

Commit d97e175

Browse files
committed
Workflow updates
1 parent 037e0e2 commit d97e175

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash -e
22

3-
git config user.name opentelemetrybot
4-
git config user.email 107717825+opentelemetrybot@users.noreply.github.com
3+
git config user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
4+
git config user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'

.github/workflows/backport.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,22 @@ jobs:
2020
# history is needed to run git cherry-pick below
2121
fetch-depth: 0
2222

23-
- name: Use CLA approved github bot
24-
run: .github/scripts/use-cla-approved-github-bot.sh
25-
2623
- uses: actions/create-github-app-token@136412a57a7081aa63c935a2cc2918f76c34f514 # v1.11.2
2724
id: app-token
2825
with:
29-
app-id: ${{ secrets.OPENTELEMETRY_BASIC_AUTOMATION_APP_ID }}
26+
app-id: ${{ secrets.OPENTELEMETRY_BASIC_AUTOMATION_CLIENT_ID }}
3027
private-key: ${{ secrets.OPENTELEMETRY_BASIC_AUTOMATION_PRIVATE_KEY }}
3128

29+
- name: Use CLA approved author
30+
env:
31+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
32+
run: |
33+
user_name=${{ steps.app-token.outputs.app-slug }}[bot]
34+
user_id=$(gh api "/users/$user_name" --jq .id)
35+
36+
git config user.name "$user_name"
37+
git config user.email "${user_id}+${user_name}@users.noreply.github.com"
38+
3239
- name: Create pull request
3340
env:
3441
NUMBER: ${{ github.event.inputs.number }}

0 commit comments

Comments
 (0)