mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 12:43:39 +08:00
Migrate from opentelemetrybot to otelbot (#3641)
This commit is contained in:

committed by
GitHub

parent
77f3171bd4
commit
c30b8fa9a5
@ -1,4 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
git config user.name opentelemetrybot
|
||||
git config user.email 107717825+opentelemetrybot@users.noreply.github.com
|
||||
git config user.name otelbot
|
||||
git config user.email 197425009+otelbot@users.noreply.github.com
|
10
.github/workflows/backport.yml
vendored
10
.github/workflows/backport.yml
vendored
@ -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
|
||||
|
2
.github/workflows/changelog.yml
vendored
2
.github/workflows/changelog.yml
vendored
@ -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
|
||||
|
@ -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 %}
|
||||
|
4
.github/workflows/misc_0.yml
vendored
4
.github/workflows/misc_0.yml
vendored
@ -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
|
||||
|
@ -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
|
||||
|
20
.github/workflows/package-prepare-release.yml
vendored
20
.github/workflows/package-prepare-release.yml
vendored
@ -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
|
||||
|
10
.github/workflows/package-release.yml
vendored
10
.github/workflows/package-release.yml
vendored
@ -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
|
||||
|
10
.github/workflows/prepare-patch-release.yml
vendored
10
.github/workflows/prepare-patch-release.yml
vendored
@ -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
|
||||
|
20
.github/workflows/prepare-release-branch.yml
vendored
20
.github/workflows/prepare-release-branch.yml
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user