Skip to content
Merged
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/repository-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Same settings as above for `main`, except:

* Restrict pushes that create matching branches: UNCHECKED

(So that opentelemetrybot can create release branches)
(So that otelbot can create release branches)

### `renovate/**/**`, and `opentelemetrybot/*`
### `renovate/**/**`, and `otelbot/*`

* Require status checks to pass before merging: UNCHECKED

Expand Down
1 change: 1 addition & 0 deletions .github/scripts/generate-release-contributors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ echo "$contributors1" \
| grep -v github-actions \
| grep -v renovate \
| grep -v opentelemetrybot \
| grep -v otelbot \
Comment on lines 89 to +90
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove the opentelemetrybot line after the next release

| sed 's/^/@/'
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
20 changes: 16 additions & 4 deletions .github/workflows/prepare-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,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
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
Comment on lines +64 to +73
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I assume it's not very expensive to regenerate this every time? Does this have the benefit of not having the token stored in this repo or what is the benefit?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's not expensive

the benefit is that it's a short-lived token, reducing the window of vulnerability if it were ever compromised

of course, we still have to be vigilant not to expose secrets.OTELBOT_PRIVATE_KEY itself

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks for the clarification.

run: |
message="Prepare release $VERSION"
branch="opentelemetrybot/prepare-release-${VERSION}"
branch="otelbot/prepare-release-${VERSION}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMPORTANT

This needs to be merged at the same time as https://github.com/open-telemetry/admin/pull/125 (note: maintainers should be able to approve and merge that PR)


git checkout -b $branch
git commit -a -m "$message"
Expand Down Expand Up @@ -114,14 +120,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
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Update version to $NEXT_VERSION"
body="Update version to \`$NEXT_VERSION\`."
branch="opentelemetrybot/update-version-to-${NEXT_VERSION}"
branch="otelbot/update-version-to-${NEXT_VERSION}"

git checkout -b $branch
git commit -a -m "$message"
Expand Down