Skip to content

feat: final check on labelled PRs, posted as TechEngineBot - #7

Open
Seungpyo1007 wants to merge 1 commit into
feat/health-personal-tokensfrom
feat/final-check
Open

Seungpyo1007 wants to merge 1 commit into
feat/health-personal-tokensfrom
feat/final-check

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

Stacked on #6 (it reuses foreign_secrets). Merge #6 first, then GitHub retargets this PR to develop.

Adding the final-check label to a PR asks TechEngineBot for a last look. The bot posts one comment, which later pushes edit instead of repeating, and a final-check commit status that branch protection can require.

What blocks

  • the PR is a draft
  • merge conflicts
  • a PR into main that is not a release from develop or a hotfix/
  • any other check that failed or was cancelled
  • a changed workflow that uses a personal token
  • a commit that no other check ran on ("nothing to confirm")

It waits up to 30 minutes for running checks before judging. It runs under pull_request_target, but it never checks out or runs the PR's code; it only reads what the GitHub API reports.

TechEngineBot was suspended once for spam, so final check is its only job: it speaks only when a person asks, and only once per PR.

Dry runs (printed only, nothing posted)

Setup needed before it can post

  • TECHENGINEBOT_TOKEN: TechEngineBot fine-grained token, ideally as an org secret
  • a final-check label in each repository that opts in
  • the code on main, since callers use @main

python -m pytest -q: 32 passed.

Adding the final-check label to a PR asks TechEngineBot for a last look. It
posts one comment, edited in place on later pushes, and a final-check
commit status that branch protection can require.

It blocks drafts, merge conflicts, PRs into main that are not a release
from develop or a hotfix, failed or cancelled checks, changed workflows
that use a personal token, and commits no other check ran on. It waits up
to 30 minutes for running checks and never runs the PR's code.

The bot was suspended once for spam, so it only speaks when asked and only
once per PR. Other repositories opt in by calling the reusable workflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant