Skip to content

canair contribute

Alias: share

usage: canair contribute [-h] [--captures | --no-captures] [--branch BRANCH]
                         [--title TITLE] [--body BODY] [--repo-dir REPO_DIR]
                         [--dry-run] [--diff] [-y] [--json]

Open a pull request contributing the active profile upstream.

A one-command path to share a reverse-engineered profile (its definitions, and by
default its captures) without the manual fork/clone/branch/push dance — it works
wherever the profile is stored. Before anything leaves your machine it validates
the profile, scans it for anything that could identify or locate you, warns if the
source looks stale, and asks you to confirm.

options:
  -h, --help           show this help message and exit
  --captures           Include the captures/ evidence (default)
  --no-captures        Contribute definitions only (ecus/, profile.yaml,
                       states, buses, groups, signals)
  --branch BRANCH      Branch name to push (default:
                       contribute/<profile>-<date>)
  --title TITLE        Pull request title (default: generated)
  --body BODY          Pull request body (default: generated checklist)
  --repo-dir REPO_DIR  Use this existing canair checkout (with a fork as
                       'origin') instead of the managed fork clone
  --dry-run            Prepare the branch and commit locally, but do not push
                       or open a PR
  --diff               Show the diff this contribution would submit, then stop
                       (no commit/push/PR)
  -y, --yes            Skip confirmation prompts
  --json               Emit a machine-readable summary

examples:
  canair contribute                     # PR the active profile (definitions + captures)
  canair --profile ev6 contribute       # PR a specific profile
  canair contribute --no-captures       # contribute definitions only
  canair contribute --diff              # show what would be contributed, then stop
  canair contribute --dry-run           # prepare the branch + commit locally; no push/PR
  canair contribute --yes --json        # non-interactive (agents/CI); emit the PR URL

requires the GitHub CLI:
  install:  brew install gh   (macOS)  ·  winget install GitHub.cli   (Windows)
            https://github.com/cli/cli#installation
  sign in:  gh auth login