How to install the pull request check

The check is one file, at talaia.dev/pr-check. On every pull request it reads the commits and fails if one is unsigned or has no story id. Two steps on every forge: put the file where the forge runs it, then make the check required, so that no signature means no merge.

GitHub

1. The file

Save it as .github/workflows/talaia.yml and commit. The next pull request shows a check named audit.

2. Make it required

Settings → Branches → add a branch protection rule formainRequire status checks to pass before merging→ pick audit. Or from the terminal:

gh api -X PUT "repos/{owner}/{repo}/branches/main/protection" \
  --input - <<'EOF'
{"required_status_checks":{"strict":false,"checks":[{"context":"audit"}]},
 "enforce_admins":false,"required_pull_request_reviews":null,"restrictions":null}
EOF

Docs: Managing a branch protection rule

Gitea / Forgejo

1. The file

Same file, at .gitea/workflows/talaia.yml. Gitea Actions runs GitHub workflows; if the runner cannot resolve the action by its short name, write it in full:uses: https://github.com/talaia-dev/talaia@main.

2. Make it required

Settings → Branches → protect mainEnable status check → pick audit.

Docs: Gitea Actions compared to GitHub Actions

GitLab

1. The job

No workflow file: a job in .gitlab-ci.yml that installs the tool and audits the merge request's commits.

talaia:
  image: golang:1.23
  variables:
    GIT_DEPTH: 0
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  script:
    - go install talaia.dev/cmd/talaia@latest
    - talaia audit --strict "$CI_MERGE_REQUEST_DIFF_BASE_SHA..HEAD"

2. Make it required

Settings → Merge requests → Merge checks → Pipelines must succeed.

Docs: Merge requests: pipelines must succeed

Bitbucket

1. The step

A pull request step in bitbucket-pipelines.yml, against the destination branch.

pipelines:
  pull-requests:
    '**':
      - step:
          image: golang:1.23
          clone:
            depth: full
          script:
            - go install talaia.dev/cmd/talaia@latest
            - git fetch origin "$BITBUCKET_PR_DESTINATION_BRANCH"
            - talaia audit --strict "origin/$BITBUCKET_PR_DESTINATION_BRANCH..HEAD"

2. Make it required

Repository settings → Branch restrictions → mainCheck for at least 1 passing build. Enforced merge checks are a Premium feature; without them the check is a warning.

Docs: Suggest or require checks before a merge

talaia.dev