Skip to content

ci(collect): open collection PRs as TechEngineBot - #391

Merged
Seungpyo1007 merged 1 commit into
developfrom
ci/collect-prs-as-techenginebot
Nov 4, 2026
Merged

Seungpyo1007 merged 1 commit into
developfrom
ci/collect-prs-as-techenginebot

Conversation

@TechEngineBot

Copy link
Copy Markdown
Member

What

TechEngineBot now opens collection PRs instead of the maintainer's account. The maintainer still runs open-collect-pr.sh by hand, and their account still pushes the task's collect/* branch. Only the gh pr create, gh pr edit and gh pr ready calls run as TechEngineBot.

  • TechEngineBot's gh login lives in its own config directory, ~/.config/gh-techenginebot, or TECHENGINEBOT_GH_CONFIG_DIR if set. The maintainer's own gh login is never used for the PR, and never changed.
  • Before it pushes anything, the script checks that this login is TechEngineBot. If it isn't, the script stops and prints the one-time login command.
  • These calls ignore GH_TOKEN and GITHUB_TOKEN, so a token in the environment can't open the PR as another account.
  • README.md and the header of collect.yml now say the same.

Why

PRs are now opened by TechEngineBot, never by a workflow:

  • collect.yml's token stays read-only.
  • "Allow GitHub Actions to create and approve pull requests" is off in every repository of the org.

So no workflow can open or approve a PR.

TechAPI's Actions policy now also lets TechEngineBot trigger workflows, so pr-checks runs on the PRs it opens. TechEngineBot opened this PR itself.

Checks

  • bash -n passes.
  • With no TechEngineBot login, the script stops at the check and prints the login command. It gets there before it fetches or pushes anything. It does the same when GH_TOKEN holds another account's token.
  • With the login in place, gh api user under that config answers TechEngineBot, and the maintainer's own gh login is unchanged.
  • No data, engine or site change.

Closes #297

The maintainer's account still pushes the task's collect/* branch, but
TechEngineBot now opens the PR, or updates the open one. Its gh login
is kept in its own config directory, ~/.config/gh-techenginebot by
default, so the maintainer's own login is never used for the PR or
changed. The script checks that login before it pushes anything, and
ignores GH_TOKEN and GITHUB_TOKEN for it, so a token in the
environment can't open the PR as another account.

No workflow opens PRs: collect.yml's token stays read-only.

Refs #297
@TechEngineBot TechEngineBot added documentation Improvements or additions to documentation enhancement New feature or request ci CI and workflow changes labels Nov 4, 2026
@Seungpyo1007
Seungpyo1007 merged commit 9a951d6 into develop Nov 4, 2026
7 checks passed
@Seungpyo1007
Seungpyo1007 deleted the ci/collect-prs-as-techenginebot branch November 4, 2026 06:33
@github-project-automation github-project-automation Bot moved this from Todo to Done in TechAPI-Project Nov 4, 2026
@TechEngineBot TechEngineBot moved this from Done to In Progress in TechAPI-Project Nov 4, 2026
@TechEngineBot TechEngineBot moved this from In Progress to Done in TechAPI-Project Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI and workflow changes documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Engine, TechEngineBot and automation (workstream)

2 participants