lfreleng-actions/github2gerrit

Creates Gerrit changes from GitHub pull requests

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 9, 2026
License
None

Pinned Snippet

workflow.ymlSHA-pinned
uses: lfreleng-actions/github2gerrit-action@f21a57072b372a58da37cbbe1e36f9814b27ee7d # v1.4.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
GERRIT_SSH_PRIVKEY_G2GSSH private key content used to authenticate to Gerrityes
SUBMIT_SINGLE_COMMITSSubmit one commit at a time to the Gerrit repositorynofalse
USE_PR_AS_COMMITUse PR title and body as the commit messagenofalse
FETCH_DEPTHFetch depth for checkoutno10
SKIP_CHECKOUTSkip 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)nofalse
PR_NUMBERPull request number to process, use 0 to process all openno0
GERRIT_KNOWN_HOSTSKnown hosts entries for Gerrit SSH (single or multi-line)no
GERRIT_SSH_USER_G2GGerrit SSH username; derived if not supplied explicitlyno""
GERRIT_SSH_USER_G2G_EMAILGerrit user email address; derived if not supplied explicitlyno""
ORGANIZATIONGitHub organization/owner (defaults to repo owner)no${{ github.repository_owner }}
REVIEWERS_EMAILComma-separated list of reviewer emails (optional)no""
ALLOW_GHE_URLSAllow GitHub Enterprise URLs in direct URL modenofalse
PRESERVE_GITHUB_PRSDo not close GitHub PRs after pushing to Gerritnotrue
CLOSE_MERGED_PRSClose GitHub PRs when corresponding Gerrit changes are mergednotrue
DRY_RUNValidate settings/PR metadata; do not write to Gerritnofalse
ALLOW_DUPLICATESAllow submitting duplicate changes without errornotrue
CI_TESTINGEnable CI testing mode; overrides .gitreview, creates orphan commitsnofalse
G2G_NO_GERRITRun full pipeline without contacting Gerrit (forces DRY_RUN, suppresses cleanup)nofalse
FORCEForce PR closure regardless of Gerrit change status (abandoned, etc)nofalse
ISSUE_IDIssue ID to include (e.g., ABC-123)no""
USE_LOCAL_ACTIONUse local repository action/code instead of the PyPI package. Set to 'true' when testing changes in a fork or branch before merging.nofalse
G2G_USE_SSH_AGENTUse SSH agent for authentication instead of file-based keys (recommended)notrue
DUPLICATE_TYPESComma-separated Gerrit states for evaluating duplicatesnoopen
NORMALISE_COMMITNormalize commit messages to conventional commit formatnofalse
VERBOSEEnable verbose output (sets log level to DEBUG)nofalse
GERRIT_SERVERGerrit server hostname; derived if not supplied explicitlyno""
GERRIT_SERVER_PORTGerrit server SSH TCP portno29418
GERRIT_PROJECTGerrit project; optional if .gitreview existsno""
GERRIT_HTTP_BASE_PATHOptional HTTP base path for Gerrit REST (e.g. /r)no""
GERRIT_HTTP_USEROptional Gerrit HTTP user (for REST authenticated checks)no""
GERRIT_HTTP_PASSWORDOptional Gerrit HTTP password/token (for REST authentication)no""
ISSUE_ID_LOOKUP_JSONJSON array mapping GitHub actors to Issue IDs (format: [{"key": "username", "value": "ISSUE-ID"}])no[]
COMMIT_RULES_JSONJSON 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_ONLYOnly accept pull requests from known automation toolsnotrue
CLEANUP_ABANDONEDClose GitHub PRs when their Gerrit changes are abandonednotrue
CLEANUP_GERRITAbandon Gerrit changes when their GitHub PRs are closednotrue
CREATE_MISSINGCreate a Gerrit change when an UPDATE operation cannot find an existing onenofalse
G2G_DISABLEDSet to 'true' to disable the action entirely (exits successfully with a message)no""
namedescription
gerrit_change_request_urlGerrit change URL(s) (newline-separated if multiple)
gerrit_change_request_numGerrit change number(s) (newline-separated if multiple)
gerrit_commit_shaPatch set commit sha(s) (newline-separated if multiple)