Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbush/snooty-autobuilder-check
GitHub Action check for snooty autobuilder
https://github.com/cbush/snooty-autobuilder-check
Last synced: 2 months ago
JSON representation
GitHub Action check for snooty autobuilder
- Host: GitHub
- URL: https://github.com/cbush/snooty-autobuilder-check
- Owner: cbush
- License: mit
- Created: 2022-05-18T14:13:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T21:52:35.000Z (11 months ago)
- Last Synced: 2024-10-03T12:44:25.820Z (4 months ago)
- Language: TypeScript
- Size: 156 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# snooty-autobuilder-check
This is a GitHub Action that checks Snooty autobuilder for success.
This is unofficial, unsupported, undocumented, unspellhcekced. YMMV.## Prerequisites
Check your repo Settings to ensure Actions are enabled:
⚠️ If your repo is **private**, you **can't use Actions for free.**
## Usage in a GitHub Actions Workflow
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:
```yaml
name: Check Autobuilder for Errorson:
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
## Usage Without GitHub Actions
You can run this script from a CI other than GitHub Actions. Clone this repo and in the clone directory, run:
```sh
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)### Examples
**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`:
```sh
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`:
```sh
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`:
```sh
node . someotheruser/someorg/somerepo/somebranch
```