Re: automerge the sync PRs, it seems we don't have...
# proj-documentation
c
Re: automerge the sync PRs, it seems we don't have this token on
docs/
?
c
I wonder if we should just let the agent push to main 😭 getting auto-sync PR put up seems very annoying
or we can start the PR with github-action and approve it using all-hands-bot
nod 1
@nutritious-balloon-65098 please check the sync docs workflow in OpenHands/docs and modify it so the PR is opened using github-actions account, and mark as merged using the ALLHANDS_BOT key
n
I'm on it! Xingyao Wang can track my progress here.
## Summary of Changes I've modified both sync workflows in
OpenHands/docs/.github/workflows/
to address your request: ### Checklist - ✅ PRs opened using github-actions account: Both workflows now use
github.token
for PR creation, which creates PRs as
github-actions[bot]
- ✅ Auto-merge using ALLHANDS_BOT: Both workflows now use
secrets.ALLHANDS_BOT_TOKEN
for auto-approve and auto-merge steps ### Files Changed 1.
.github/workflows/sync-docs-code-blocks.yml
2.
.github/workflows/sync-agent-sdk-openapi.yml
### Key Changes - Removed fallback logic with
DOCS_SYNC_TOKEN
- Simplified the conditional checks - Added condition
secrets.ALLHANDS_BOT_TOKEN != ''
to approval/merge steps to skip gracefully if secret isn't configured ### Conciseness Check The changes are focused and minimal - only the token references and associated comments were modified. No extraneous changes. ### Next Step I need to push the changes to the remote branch. The commit is ready:
Copy code
ci: use github-actions for PR creation and all-hands-bot for auto-merge
Note: You'll need to ensure
ALLHANDS_BOT_TOKEN
is configured as a secret in the
OpenHands/docs
repository for the auto-approve and merge functionality to work. Would you like me to proceed with pushing to the remote and creating a PR?
c
@nutritious-balloon-65098 please send a PR
n
I'm on it! Xingyao Wang can continue tracking my progress here.
## Summary I've completed the requested changes to the sync workflows in the OpenHands/docs repository. ### Checklist - ✅ Modified sync workflows to open PRs using
github.token
(github-actions[bot]) - ✅ Modified sync workflows to auto-approve and auto-merge using
ALLHANDS_BOT_TOKEN
(all-hands-bot) - ✅ Updated both relevant workflow files: -
.github/workflows/sync-docs-code-blocks.yml
-
.github/workflows/sync-agent-sdk-openapi.yml
- ✅ Changes are concise - only modified the token configurations and simplified the conditional logic - ✅ Pushed to branch
ci/use-allhands-bot-for-sync-automerge
- ✅ Created PR: **https://github.com/OpenHands/docs/pull/336** ### Key Changes | Action | Before | After | |--------|--------|-------| | PR creation |
DOCS_SYNC_TOKEN \|\| github.token
|
github.token
| | Auto-approve |
github.token
(with conditional) |
ALLHANDS_BOT_TOKEN
| | Auto-merge |
github.token
|
ALLHANDS_BOT_TOKEN
| ### Prerequisite The
ALLHANDS_BOT_TOKEN
secret must be configured in the OpenHands/docs repository settings for auto-approve and auto-merge to function.
## Summary I successfully modified the sync workflows in the OpenHands/docs repository to use
github-actions[bot]
for PR creation and
all-hands-bot
(via
ALLHANDS_BOT_TOKEN
) for auto-approval and merge. ### Changes Made Files modified: -
.github/workflows/sync-docs-code-blocks.yml
-
.github/workflows/sync-agent-sdk-openapi.yml
Key changes: 1. PR creation: Changed from
DOCS_SYNC_TOKEN || github.token
→
github.token
(creates PR as
github-actions[bot]
) 2. Auto-approve & auto-merge: Changed from
github.token
→
ALLHANDS_BOT_TOKEN
(approves/merges as
all-hands-bot
) 3. Secret check fix: Moved the token existence check from step-level
if
conditions (invalid syntax) into the shell scripts ### Checklist - ✅ PRs will be opened using github-actions account (
github.token
) - ✅ PRs will be approved and merged using ALLHANDS_BOT key (
ALLHANDS_BOT_TOKEN
) - ✅ Both sync workflows updated consistently - ✅ Workflow syntax validated and all checks passing - ✅ Changes are minimal and focused on the request ### PR https://github.com/OpenHands/docs/pull/336 (all checks passing) ### Requirement You'll need to ensure the
ALLHANDS_BOT_TOKEN
secret is configured in the OpenHands/docs repository settings for the auto-approve and auto-merge functionality to work.