Skip to content

Commit ec10094

Browse files
committed
ci: automatically add new issues and PRs to OTel project board
Adds a GHA workflow that automatically adds newly opened issues, transferred issues, and opened PRs to the shared OTel Python project board (https://github.com/orgs/open-telemetry/projects/88). Uses the existing otelbot GitHub App with actions/add-to-project. Mirrors the same workflow added to opentelemetry-python-contrib#4306. Assisted-by: Claude Sonnet 4.6
1 parent fb94553 commit ec10094

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Add to project
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- transferred
8+
pull_request_target:
9+
# SECURITY NOTE: pull_request_target runs in the base repo context and has access to
10+
# secrets, even for PRs from forks. This is intentional — pull_request does NOT have
11+
# access to secrets for fork PRs, which means it cannot authenticate to add items to
12+
# the org project.
13+
#
14+
# This is safe ONLY because this workflow never checks out any code from the PR. It
15+
# only uses the event payload (a node ID) to call the GitHub API. No fork code is
16+
# ever executed. Future maintainers MUST NOT add an actions/checkout step here without
17+
# reassessing the security implications.
18+
types:
19+
- opened
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
add-to-project:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
29+
id: otelbot-token
30+
with:
31+
app-id: ${{ vars.OTELBOT_APP_ID }}
32+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
33+
# owner is required to generate a token with org-level project access
34+
owner: open-telemetry
35+
36+
- uses: actions/add-to-project@v1
37+
with:
38+
project-url: https://github.com/orgs/open-telemetry/projects/88
39+
github-token: ${{ steps.otelbot-token.outputs.token }}

0 commit comments

Comments
 (0)