Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/scripts/use-cla-approved-github-bot.sh
Original file line number Diff line number Diff line change
@@ -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 changes: 8 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/misc_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/package-prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/package-prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/prepare-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down