Skip to content

Commit ff9dc82

Browse files
Migrate from opentelemetrybot to otelbot (#4685)
1 parent d4e6068 commit ff9dc82

File tree

8 files changed

+42
-18
lines changed

8 files changed

+42
-18
lines changed
Lines changed: 2 additions & 2 deletions
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 otelbot
4+
git config user.email 197425009+otelbot@users.noreply.github.com

.github/workflows/backport.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,22 @@ jobs:
2424
- name: Use CLA approved github bot
2525
run: .github/scripts/use-cla-approved-github-bot.sh
2626

27+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
28+
id: otelbot-token
29+
with:
30+
app-id: ${{ vars.OTELBOT_APP_ID }}
31+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
32+
2733
- name: Create pull request
2834
env:
2935
NUMBER: ${{ github.event.inputs.number }}
3036
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
31-
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
37+
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
3238
run: |
3339
commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid)
3440
title=$(gh pr view $NUMBER --json title --jq .title)
3541
36-
branch="opentelemetrybot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
42+
branch="otelbot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
3743
3844
git cherry-pick $commit
3945
git push origin HEAD:$branch

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
if: |
1717
!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')
18-
&& github.actor != 'opentelemetrybot'
18+
&& github.actor != 'otelbot[bot]'
1919
2020
steps:
2121
- uses: actions/checkout@v4

.github/workflows/check-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
needs: changedfiles
2626
if: |
27-
github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
27+
github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request'
2828
&& ${{needs.changedfiles.outputs.md}}
2929
steps:
3030
- name: Checkout Repo

.github/workflows/misc_0.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
runs-on: ubuntu-latest
9191
timeout-minutes: 30
9292
if: |
93-
github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
93+
github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request'
9494
steps:
9595
- name: Checkout repo @ SHA - ${{ github.sha }}
9696
uses: actions/checkout@v4
@@ -150,7 +150,7 @@ jobs:
150150
timeout-minutes: 30
151151
if: |
152152
!contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
153-
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
153+
&& github.actor != 'otelbot[bot]' && github.event_name == 'pull_request'
154154
steps:
155155
- name: Checkout repo @ SHA - ${{ github.sha }}
156156
uses: actions/checkout@v4
@@ -202,7 +202,7 @@ jobs:
202202
timeout-minutes: 30
203203
if: |
204204
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
205-
&& github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
205+
&& github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request'
206206
steps:
207207
- name: Checkout repo @ SHA - ${{ github.sha }}
208208
uses: actions/checkout@v4

.github/workflows/prepare-patch-release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,20 @@ jobs:
6464
- name: Use CLA approved github bot
6565
run: .github/scripts/use-cla-approved-github-bot.sh
6666

67+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
68+
id: otelbot-token
69+
with:
70+
app-id: ${{ vars.OTELBOT_APP_ID }}
71+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
72+
6773
- name: Create pull request
6874
id: create_pr
6975
env:
7076
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
71-
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
77+
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
7278
run: |
7379
message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}"
74-
branch="opentelemetrybot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}"
80+
branch="otelbot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}"
7581
7682
git commit -a -m "$message"
7783
git push origin HEAD:$branch

.github/workflows/prepare-release-branch.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,20 @@ jobs:
9090
- name: Use CLA approved github bot
9191
run: .github/scripts/use-cla-approved-github-bot.sh
9292

93+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
94+
id: otelbot-token
95+
with:
96+
app-id: ${{ vars.OTELBOT_APP_ID }}
97+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
98+
9399
- name: Create pull request against the release branch
94100
id: create_release_branch_pr
95101
env:
96102
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
97-
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
103+
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
98104
run: |
99105
message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}"
100-
branch="opentelemetrybot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}"
106+
branch="otelbot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}"
101107
102108
git commit -a -m "$message"
103109
git push origin HEAD:$branch
@@ -178,15 +184,21 @@ jobs:
178184
- name: Use CLA approved github bot
179185
run: .github/scripts/use-cla-approved-github-bot.sh
180186

187+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
188+
id: otelbot-token
189+
with:
190+
app-id: ${{ vars.OTELBOT_APP_ID }}
191+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
192+
181193
- name: Create pull request against main
182194
id: create_main_pr
183195
env:
184196
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
185-
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
197+
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
186198
run: |
187199
message="Update version to ${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}"
188200
body="Update version to \`${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}\`."
189-
branch="opentelemetrybot/update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_NEXT_VERSION}"
201+
branch="otelbot/update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_NEXT_VERSION}"
190202
191203
git commit -a -m "$message"
192204
git push origin HEAD:$branch

.github/workflows/templates/misc.yml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ jobs:
3636
{%- if job_data == "generate-workflows" %}
3737
if: |
3838
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
39-
&& github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
39+
&& github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request'
4040
{%- endif %}
4141
{%- if job_data == "public-symbols-check" %}
4242
if: |
4343
!contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
44-
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
44+
&& github.actor != 'otelbot[bot]' && github.event_name == 'pull_request'
4545
{%- endif %}
4646
{%- if job_data == "docs" %}
4747
if: |
48-
github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
48+
github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request'
4949
{%- endif %}
5050
steps:
5151
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}

0 commit comments

Comments
 (0)