Skip to content

canair contribute

Alias: share

usage: canair contribute [-h] [--captures | --no-captures] [--branch BRANCH]
                         [--title TITLE] [--body BODY] [--include-logs |
                         --no-logs] [--repo-dir REPO_DIR] [--dry-run] [--diff]
                         [-y] [--discard-local | --keep-local] [--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 summary of the
                       car, ECUs, states, sessions and link quality, plus a
                       checklist)
  --include-logs       Attach the diagnostics log (canair logs) entries
                       written while the contributed sessions were recording
                       to the PR body, for debugging; device addresses, local
                       paths, emails and VINs are scrubbed (default)
  --no-logs            Leave the diagnostics log out of the PR body
  --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
  --discard-local      Once the PR is open, drop the changes it carries from
                       your canair checkout (backed up first), so pulling the
                       merged PR does not conflict with them. Without this or
                       --keep-local you are asked; with --yes or --json they
                       are kept
  --keep-local         Leave your checkout's uncommitted profile changes alone
                       without asking
  --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 --no-logs           # leave the scrubbed diagnostics log out of the 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