From c30b8fa9a513ddb38f9ed534493d1b35b8be9beb Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:02:44 -0700 Subject: [PATCH] Migrate from opentelemetrybot to otelbot (#3641) --- .../scripts/use-cla-approved-github-bot.sh | 4 ++-- .github/workflows/backport.yml | 10 ++++++++-- .github/workflows/changelog.yml | 2 +- .../src/generate_workflows_lib/misc.yml.j2 | 6 +++--- .github/workflows/misc_0.yml | 4 ++-- .../package-prepare-patch-release.yml | 10 ++++++++-- .github/workflows/package-prepare-release.yml | 20 +++++++++++++++---- .github/workflows/package-release.yml | 10 ++++++++-- .github/workflows/prepare-patch-release.yml | 10 ++++++++-- .github/workflows/prepare-release-branch.yml | 20 +++++++++++++++---- 10 files changed, 72 insertions(+), 24 deletions(-) diff --git a/.github/scripts/use-cla-approved-github-bot.sh b/.github/scripts/use-cla-approved-github-bot.sh index a411c6812..fc47865a5 100755 --- a/.github/scripts/use-cla-approved-github-bot.sh +++ b/.github/scripts/use-cla-approved-github-bot.sh @@ -1,4 +1,4 @@ #!/bin/bash -e -git config user.name opentelemetrybot -git config user.email 107717825+opentelemetrybot@users.noreply.github.com \ No newline at end of file +git config user.name otelbot +git config user.email 197425009+otelbot@users.noreply.github.com \ No newline at end of file diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 26789093f..247e43814 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -24,16 +24,22 @@ jobs: - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: otelbot-token + with: + app-id: ${{ vars.OTELBOT_APP_ID }} + private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} + - name: Create pull request env: NUMBER: ${{ github.event.inputs.number }} # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid) title=$(gh pr view $NUMBER --json title --jq .title) - branch="opentelemetrybot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}" + branch="otelbot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}" git cherry-pick $commit git push origin HEAD:$branch diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 491ddd27f..4fcb55a2d 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest if: | !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') - && github.actor != 'opentelemetrybot' + && github.actor != 'otelbot[bot]' steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 index 56508d2be..25f770bf6 100644 --- a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 +++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 @@ -36,16 +36,16 @@ jobs: {%- if job_data == "generate-workflows" %} if: | !contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows') - && github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request' + && github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request' {%- endif %} {%- if job_data == "public-symbols-check" %} if: | !contains(github.event.pull_request.labels.*.name, 'Approve Public API check') - && github.actor != 'opentelemetrybot' && github.event_name == 'pull_request' + && github.actor != 'otelbot[bot]' && github.event_name == 'pull_request' {%- endif %} {%- if job_data == "docs" %} if: | - github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request' + github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request' {%- endif %} steps: - name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %} diff --git a/.github/workflows/misc_0.yml b/.github/workflows/misc_0.yml index 5221d1d5c..562ea6ff8 100644 --- a/.github/workflows/misc_0.yml +++ b/.github/workflows/misc_0.yml @@ -71,7 +71,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 if: | - github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request' + github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request' steps: - name: Checkout repo @ SHA - ${{ github.sha }} uses: actions/checkout@v4 @@ -115,7 +115,7 @@ jobs: timeout-minutes: 30 if: | !contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows') - && github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request' + && github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request' steps: - name: Checkout repo @ SHA - ${{ github.sha }} uses: actions/checkout@v4 diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index f216eada8..fc813398c 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -105,13 +105,19 @@ jobs: - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: otelbot-token + with: + app-id: ${{ vars.OTELBOT_APP_ID }} + private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} + - name: Create pull request env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | message="Prepare patch release for ${PACKAGE_NAME} v${NEXT_VERSION}" - branch="opentelemetrybot/patch-${PACKAGE_NAME}-version-to-v${NEXT_VERSION}" + branch="otelbot/patch-${PACKAGE_NAME}-version-to-v${NEXT_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index d596c4c74..cad38a8d6 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -129,13 +129,19 @@ jobs: - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: otelbot-token + with: + app-id: ${{ vars.OTELBOT_APP_ID }} + private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} + - name: Create pull request against the release branch env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | message="Prepare release for ${PACKAGE_NAME} v${VERSION}" - branch="opentelemetrybot/prepare-${RELEASE_BRANCH_NAME}" + branch="otelbot/prepare-${RELEASE_BRANCH_NAME}" git commit -a -m "$message" git push origin HEAD:$branch @@ -181,14 +187,20 @@ jobs: - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: otelbot-token-main + with: + app-id: ${{ vars.OTELBOT_APP_ID }} + private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} + - name: Create pull request against main env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.otelbot-token-main.outputs.token }} run: | message="Update ${PACKAGE_NAME} version to v${NEXT_VERSION}" body="Update \`${PACKAGE_NAME}\` version to v\`${NEXT_VERSION}\`." - branch="opentelemetrybot/update-${PACKAGE_NAME}-version-to-v${NEXT_VERSION}" + branch="otelbot/update-${PACKAGE_NAME}-version-to-v${NEXT_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index f5f7bcb34..960954ba6 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -136,14 +136,20 @@ jobs: - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: otelbot-token + with: + app-id: ${{ vars.OTELBOT_APP_ID }} + private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} + - name: Create pull request against main env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | message="Copy changelog updates from $GITHUB_REF_NAME" body="Copy changelog updates from \`$GITHUB_REF_NAME\`." - branch="opentelemetrybot/changelog-${GITHUB_REF_NAME//\//-}" + branch="otelbot/changelog-${GITHUB_REF_NAME//\//-}" if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then if git diff --quiet; then diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index ccaffafea..38db55a79 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -70,14 +70,20 @@ jobs: - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: otelbot-token + with: + app-id: ${{ vars.OTELBOT_APP_ID }} + private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} + - name: Create pull request id: create_pr env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}" - branch="opentelemetrybot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}" + branch="otelbot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 1d9ff92c0..a5e5ceac1 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -93,14 +93,20 @@ jobs: - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: otelbot-token + with: + app-id: ${{ vars.OTELBOT_APP_ID }} + private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} + - name: Create pull request against the release branch id: create_release_branch_pr env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}" - branch="opentelemetrybot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}" + branch="otelbot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch @@ -187,15 +193,21 @@ jobs: - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: otelbot-token-main + with: + app-id: ${{ vars.OTELBOT_APP_ID }} + private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} + - name: Create pull request against main id: create_main_pr env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.otelbot-token-main.outputs.token }} run: | message="Update version to ${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}" body="Update version to \`${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}\`." - branch="opentelemetrybot/update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_NEXT_VERSION}" + branch="otelbot/update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_NEXT_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch