Skip to content

Commit 2e50ce2

Browse files
miaulalalaclaude
andcommitted
refactor: use org-wide COMMAND_BOT_PAT for docs PR
Replace custom DOCS_PR_TOKEN with the existing COMMAND_BOT_PAT secret already used across the Nextcloud org. This avoids creating a new token and lets the command bot author the documentation PR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 169e157 commit 2e50ce2

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/screenshots.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,22 @@ jobs:
9191
if-no-files-found: warn
9292

9393
# Opens a PR against nextcloud/documentation with updated screenshots.
94-
# Requires a PAT with repo scope stored as DOCS_PR_TOKEN in the activity repo secrets.
94+
# Uses the org-wide COMMAND_BOT_PAT secret.
9595
# The step is skipped gracefully if the secret is not configured.
9696
- name: Open PR against nextcloud/documentation
97-
if: inputs.open-docs-pr != false && env.DOCS_PR_TOKEN != ''
97+
if: inputs.open-docs-pr != false && env.COMMAND_BOT_PAT != ''
9898
env:
99-
DOCS_PR_TOKEN: ${{ secrets.DOCS_PR_TOKEN }}
99+
COMMAND_BOT_PAT: ${{ secrets.COMMAND_BOT_PAT }}
100100
run: |
101101
DOCS_BRANCH="chore/activity-screenshots-$(date +%Y%m%d-%H%M%S)"
102102
SCREENSHOT_DIR="cypress/snapshots/actual/screenshots.cy.ts"
103103
104104
# Clone the documentation repo using the PAT
105-
git clone --depth 1 "https://x-access-token:${DOCS_PR_TOKEN}@github.com/nextcloud/documentation.git" /tmp/documentation
105+
git clone --depth 1 "https://x-access-token:${COMMAND_BOT_PAT}@github.com/nextcloud/documentation.git" /tmp/documentation
106106
cd /tmp/documentation
107107
108-
git config user.name "nextcloud-activity-bot"
109-
git config user.email "noreply@nextcloud.com"
108+
git config user.name "nextcloud-command"
109+
git config user.email "nextcloud-command@users.noreply.github.com"
110110
git checkout -b "$DOCS_BRANCH"
111111
112112
# Copy user screenshots
@@ -132,7 +132,7 @@ jobs:
132132
git push origin "$DOCS_BRANCH"
133133
134134
# Create the PR
135-
GH_TOKEN="${DOCS_PR_TOKEN}" gh pr create \
135+
GH_TOKEN="${COMMAND_BOT_PAT}" gh pr create \
136136
--repo nextcloud/documentation \
137137
--base master \
138138
--head "$DOCS_BRANCH" \

0 commit comments

Comments
 (0)