Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/repository-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Repository checks

on:
pull_request:
branches:
- main
push:
branches:
- main

permissions:
contents: read

jobs:
checks:
name: Repository checks
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false

# Each tool is a release binary, pinned by its version and SHA-256.
- name: Install Gitleaks and actionlint
env:
GITLEAKS_VERSION: 8.30.1
GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb
ACTIONLINT_VERSION: 1.7.12
ACTIONLINT_SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8
run: |
bin="$RUNNER_TEMP/bin"
mkdir -p "$bin"
cd "$RUNNER_TEMP"

gitleaks_archive="gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
curl -fsSLO "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${gitleaks_archive}"
echo "${GITLEAKS_SHA256} ${gitleaks_archive}" | sha256sum --check
tar -xzf "$gitleaks_archive" -C "$bin" gitleaks

actionlint_archive="actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
curl -fsSLO "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/${actionlint_archive}"
echo "${ACTIONLINT_SHA256} ${actionlint_archive}" | sha256sum --check
tar -xzf "$actionlint_archive" -C "$bin" actionlint

echo "$bin" >> "$GITHUB_PATH"

# A pull request scans its own commits (base..head), and a push to main
# scans the pushed commits (before..after). When the base commit is not
# in the clone (a zero SHA for a new branch, or a force push), the scan
# reads the full history that the head reaches.
- name: Gitleaks
env:
GITLEAKS_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
GITLEAKS_HEAD: ${{ github.event.pull_request.head.sha || github.event.after }}
run: |
log_opts="$GITLEAKS_BASE..$GITLEAKS_HEAD"
if ! git cat-file -e "$GITLEAKS_BASE^{commit}" 2>/dev/null; then
log_opts="$GITLEAKS_HEAD"
fi
echo "Gitleaks: --log-opts=$log_opts"

# The repository is public, so --redact keeps each secret out of the log.
gitleaks git --no-banner --redact --verbose --log-opts="$log_opts" .

- name: Markdown lint
uses: DavidAnson/markdownlint-cli2-action@3ce8f712b5d8f31acd8e201be6d97e3d2bb23eb7 # v25.1.0
with:
globs: '**/*.md'

- name: actionlint
run: actionlint
5 changes: 5 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# README.md is customer-facing copy that keeps each paragraph on one line,
# and a table row cannot wrap. Wrapping the copy would edit text that this
# repository does not own, so line length is not checked.
config:
MD013: false
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ The code expires after 5 minutes. The CLI keeps its refresh token in the credent

## Commands

| Command | Result |
| -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `agentgolf login` | Sign in and save the login. |
| `agentgolf logout` | Remove the saved login. |
| `agentgolf harness setup <claude-code\|codex\|omp>` | Create a personal publishing key and write the settings of the harness. |
| `agentgolf attribute <session-id> <pull-request-url>` | Link one agent session to one GitHub pull request. |
| `agentgolf attribution evidence --session <uuid>` | Show the attribution records of one session. |
| `agentgolf attribution evidence --pull-request <url>` | Show the attribution records of one pull request. |
| `agentgolf attribution repositories` | List the repositories that attribution covers in your workspace. |
| Command | Result |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `agentgolf login` | Sign in and save the login. |
| `agentgolf logout` | Remove the saved login. |
| `agentgolf harness setup <claude-code\|codex\|omp>` | Create a personal publishing key and write the settings of the harness. |
| `agentgolf attribute <session-id> <pull-request-url>` | Link one agent session to one GitHub pull request. |
| `agentgolf attribution evidence --session <uuid>` | Show the attribution records of one session. |
| `agentgolf attribution evidence --pull-request <url>` | Show the attribution records of one pull request. |
| `agentgolf attribution repositories` | List the repositories that attribution covers in your workspace. |
| `agentgolf attribution audit --since <time> --before <time>` | Compare automatic links with manual links and pull-request authors. Times are UTC `YYYYMMDDHHmmss`. |

`agentgolf harness setup` flags:
Expand Down