This is a GitHub Action that checks Snooty autobuilder for success. This is unofficial, unsupported, undocumented, unspellhcekced. YMMV.
Check your repo Settings to ensure Actions are enabled:
This action assumes your repo uses snooty autobuilder, which is unlikely unless you work on MongoDB docs.
Create a workflow YAML file in your repo at /.github/workflows/check-autobuilder.yml:
name: Check Autobuilder for Errors
on:
pull_request:
paths:
- "source/**"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cbush/snooty-autobuilder-check@main
For example: https://github.com/mongodb/docs-realm/blob/master/.github/workflows/check-autobuilder.yml
You can run this script from a CI other than GitHub Actions. Clone this repo and in the clone directory, run:
npm install
npm run build
node . actor/owner/repo/branch
Leaving the slashes, replace actor/owner/repo/branch
with the PR info:
- actor - the username of the user who pushed to the branch (github.actor)
- owner/repo - the org and repo name (github.event.pull_request.head.repo.full_name)
- branch - the branch name (github.head_ref)
Across forks: user someuser
opens a PR to merge the branch somebranch
on the fork github.com/someuser/somerepo
to the upstream repo github.com/someorg/somerepo
:
node . someuser/someuser/somerepo/somebranch
Not across forks: user someuser
opens a PR to merge the upstream branch somebranch
to the upstream repo github.com/someorg/somerepo
:
node . someuser/someorg/somerepo/somebranch
Additional commits by other users: user someotheruser
adds a commit to the upstream branch somebranch
, though the PR was opened by someuser
:
node . someotheruser/someorg/somerepo/somebranch