regression-sniffer
v1.0.1
Published
Loyal CLI tool that sniffs out any follow-up and revert commit of your cherry-picked commit
Maintainers
Readme
Regression Sniffer CLI
Description
Simple CLI tool that checks upstream projects for follow-ups in downstream source code. It works in tandem with GitHub Action @redhat-plumbers-in-action/regression-sniffer. Detected follow-ups are reported in Jira as issues for further triage.
Configuration
Make sure to store your JIRA Personal Access Token (PAT) and GitHub Personal Access Token (PAT) in the ~/.config/regression-sniffer/.env or ~/.env.regression-sniffer file:
# ~/.config/regression-sniffer/.env
JIRA_API_TOKEN="example-token"
GITHUB_API_TOKEN="example-token"[!TIP]
You can also set default values for the
component,upstream,downstreamand more in the~/.config/regression-sniffer/.envor~/.env.regression-snifferfile:# ~/.config/regression-sniffer/.env COMPONENT="your-component" UPSTREAM="your-upstream-org/your-upstream-repo" DOWNSTREAM="your-downstream-org/your-downstream-repo" RELEASE="your-release-version" EPIC="your-epic-key" LABEL="your-label" CLEANUP="true" NOCOLOR="true" DRY="true"
Installation
# run it using npx
npx regression-sniffer
# or install it globally using npm
npm install -g regression-sniffer
regression-sniffer --helpHow to use
[!IMPORTANT]
This tool is intended to be used by Red Hat employees on the Red Hat JIRA instance. It was designed to be used on systemd component in first place, but it can be updated to work with other components.
$ regression-sniffer --help
Usage: regression-sniffer [options]
🔍 A CLI tool that searches for follow-up and revert commits in upstream projects and creates Jira issues to track them.
Options:
-V, --version output the version number
-c, --component <component> component name
-r, --release <release> RHEL major release version, e.g. 8, 9, 10, etc.
-e, --epic <epic> Jira epic name
-d, --downstream <downstream> GitHub downstream source-git org/repo
-f, --from <from> upstream version(tag) from which to start searching for backported commits
-u, --upstream <upstream> GitHub upstream org/repo
-L, --label <label> Jira issue label that indicates issues reported by this tool
-w, --cleanup cleanup cloned repositories (default: false)
-n, --nocolor disable color output (default: false)
-x, --dry dry run
-h, --help display help for command