Go Example
Repository: janitor-sh/go-example
Run locally
Section titled “Run locally”go run .Validate janitor locally
Section titled “Validate janitor locally”janitor --no-commitCI behavior
Section titled “CI behavior”The example workflow runs on pushes and pull requests to main and uses go fmt directly:
- name: Run go fmt run: go fmt ./...
- name: Commit and push formatting changes run: | git config user.name "janitor-sh[bot]" git config user.email "janitor-sh[bot]@users.noreply.github.com" if ! git diff --quiet -- .; then git add -u git commit -m "chore(janitor): apply automated lint/format fixes" git push fi