lfreleng-actions/github2gerrit
Creates Gerrit changes from GitHub pull requests
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 9, 2026
- License
- None
Pinned Snippet
uses: lfreleng-actions/github2gerrit-action@f21a57072b372a58da37cbbe1e36f9814b27ee7d # v1.4.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| GERRIT_SSH_PRIVKEY_G2G | SSH private key content used to authenticate to Gerrit | yes | — |
| SUBMIT_SINGLE_COMMITS | Submit one commit at a time to the Gerrit repository | no | false |
| USE_PR_AS_COMMIT | Use PR title and body as the commit message | no | false |
| FETCH_DEPTH | Fetch depth for checkout | no | 10 |
| SKIP_CHECKOUT | Skip the internal repository checkout. Set when the caller has already checked out the target repository at the desired ref (e.g. the bundled reusable workflow, which also checks out this action into the workspace and must not have it deleted by a nested checkout) | no | false |
| PR_NUMBER | Pull request number to process, use 0 to process all open | no | 0 |
| GERRIT_KNOWN_HOSTS | Known hosts entries for Gerrit SSH (single or multi-line) | no | — |
| GERRIT_SSH_USER_G2G | Gerrit SSH username; derived if not supplied explicitly | no | "" |
| GERRIT_SSH_USER_G2G_EMAIL | Gerrit user email address; derived if not supplied explicitly | no | "" |
| ORGANIZATION | GitHub organization/owner (defaults to repo owner) | no | ${{ github.repository_owner }} |
| REVIEWERS_EMAIL | Comma-separated list of reviewer emails (optional) | no | "" |
| ALLOW_GHE_URLS | Allow GitHub Enterprise URLs in direct URL mode | no | false |
| PRESERVE_GITHUB_PRS | Do not close GitHub PRs after pushing to Gerrit | no | true |
| CLOSE_MERGED_PRS | Close GitHub PRs when corresponding Gerrit changes are merged | no | true |
| DRY_RUN | Validate settings/PR metadata; do not write to Gerrit | no | false |
| ALLOW_DUPLICATES | Allow submitting duplicate changes without error | no | true |
| CI_TESTING | Enable CI testing mode; overrides .gitreview, creates orphan commits | no | false |
| G2G_NO_GERRIT | Run full pipeline without contacting Gerrit (forces DRY_RUN, suppresses cleanup) | no | false |
| FORCE | Force PR closure regardless of Gerrit change status (abandoned, etc) | no | false |
| ISSUE_ID | Issue ID to include (e.g., ABC-123) | no | "" |
| USE_LOCAL_ACTION | Use local repository action/code instead of the PyPI package. Set to 'true' when testing changes in a fork or branch before merging. | no | false |
| G2G_USE_SSH_AGENT | Use SSH agent for authentication instead of file-based keys (recommended) | no | true |
| DUPLICATE_TYPES | Comma-separated Gerrit states for evaluating duplicates | no | open |
| NORMALISE_COMMIT | Normalize commit messages to conventional commit format | no | false |
| VERBOSE | Enable verbose output (sets log level to DEBUG) | no | false |
| GERRIT_SERVER | Gerrit server hostname; derived if not supplied explicitly | no | "" |
| GERRIT_SERVER_PORT | Gerrit server SSH TCP port | no | 29418 |
| GERRIT_PROJECT | Gerrit project; optional if .gitreview exists | no | "" |
| GERRIT_HTTP_BASE_PATH | Optional HTTP base path for Gerrit REST (e.g. /r) | no | "" |
| GERRIT_HTTP_USER | Optional Gerrit HTTP user (for REST authenticated checks) | no | "" |
| GERRIT_HTTP_PASSWORD | Optional Gerrit HTTP password/token (for REST authentication) | no | "" |
| ISSUE_ID_LOOKUP_JSON | JSON array mapping GitHub actors to Issue IDs (format: [{"key": "username", "value": "ISSUE-ID"}]) | no | [] |
| COMMIT_RULES_JSON | JSON object defining commit message rules with per-project and per-actor overrides. Supports arbitrary label-value pairs placed in the commit body or trailer block. (see: docs/COMMIT_RULES.md) | no | "" |
| AUTOMATION_ONLY | Only accept pull requests from known automation tools | no | true |
| CLEANUP_ABANDONED | Close GitHub PRs when their Gerrit changes are abandoned | no | true |
| CLEANUP_GERRIT | Abandon Gerrit changes when their GitHub PRs are closed | no | true |
| CREATE_MISSING | Create a Gerrit change when an UPDATE operation cannot find an existing one | no | false |
| G2G_DISABLED | Set to 'true' to disable the action entirely (exits successfully with a message) | no | "" |
Outputs
| name | description |
|---|---|
| gerrit_change_request_url | Gerrit change URL(s) (newline-separated if multiple) |
| gerrit_change_request_num | Gerrit change number(s) (newline-separated if multiple) |
| gerrit_commit_sha | Patch set commit sha(s) (newline-separated if multiple) |