Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

Docs: Deprecate in favour of github2gerrit-action - #64

Merged
tykeal merged 4 commits into
lfit:mainfrom
modeseven-lfit:docs/deprecate-for-github2gerrit-action
Sep 29, 2026
Merged

tykeal merged 4 commits into
lfit:mainfrom
modeseven-lfit:docs/deprecate-for-github2gerrit-action

Conversation

@ModeSevenIndustrialSolutions

@ModeSevenIndustrialSolutions ModeSevenIndustrialSolutions commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prepares this repository for archiving. The README gains a deprecation
notice pointing to the maintained replacement,
lfreleng-actions/github2gerrit-action,
and its credential guidance is corrected first, because the README
stays readable after the repository becomes read-only.

Changes

Docs: Deprecate in favour of github2gerrit-action

Deprecation notice (top of README.md)

  • States the action is deprecated, unmaintained (no security fixes)
    and will be archived.
  • Migration: swap to the new composite action or its reusable
    workflow, pinned to a release commit SHA. Input, secret and
    GERRIT_* variable names carry over (verified against the new
    action.yaml), but it is not a drop-in replacement. The notice
    lists every difference:
    • AUTOMATION_ONLY defaults to true (closes human-authored PRs).
    • PRESERVE_GITHUB_PRS defaults to true (leaves PRs open); set
      false to keep this action's close-after-submit behavior.
    • ISSUEID + inject-issue-id-action → ISSUE_ID /
      ISSUE_ID_LOOKUP_JSON inputs.
    • Composite outputs url / change_number →
      gerrit_change_request_url / gerrit_change_request_num.

Credential corrections

Before Problem After
GERRIT_SSH_PRIVKEY_G2G: "The private key has to be added to the Gerrit user's account settings" Gerrit holds the public key. Following this would disclose the private key. Public key registered on the account; private key only in the GitHub secret.
"Set the following under Organization or repository variables" (including the private key) Variables are not masked in logs. The private key is a secret; the rest are variables.
Prerequisites linked to personal key registration, and asked for a GitHub account "with permissions to submit changes to Gerrit" Wrong account type and procedure. Describes the Gerrit service account and how an administrator registers its public key (REST API or gerrit set-account), since the web UI only manages the signed-in user's keys.
REVIEWER_EMAIL Not an input the action defines. REVIEWERS_EMAIL, matching action.yaml and the reusable workflow.

Docs: Address Copilot review feedback

Expands the migration notes from one behavior difference to the full
list above, after Copilot pointed out the replacement is not drop-in.

CI(pre-commit): Let prettier skip ignored files

.prettierignore excludes *.md, so any Markdown-only commit made
prettier exit 1 with "No files matching the given patterns were
found", blocking this change. --no-error-on-unmatched-pattern
fixes that; other file types are still checked.

CI: Replace constant if conditions in examples

actionlint v1.7.11 (pulled in by the #57 autoupdate) added the
if-cond rule, which rejects the literal if: false used to disable
the example caller workflows (call-g2g-composite-action.yaml,
call-g2g-reusable-workflow.yaml, example-v2-usage.yaml). This has
failed pre-commit.ci on main and every PR since then. Each job is
now gated on the G2G_RUN_EXAMPLE_WORKFLOWS repository variable: it
stays skipped unless the variable is set to 'true'.

After merge

Archive the repository (Settings → General → Archive this repository).

Validation

  • prek run --all-files passes, including actionlint; pre-commit
    hooks passed on all commits.

.prettierignore excludes Markdown, so a commit touching only Markdown
passes prettier nothing but ignored files. Prettier then reports "No
files matching the given patterns were found" and exits 1, blocking
documentation-only commits. Pass --no-error-on-unmatched-pattern so
that case succeeds; other files are still checked as before.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
This action is superseded by lfreleng-actions/github2gerrit-action and
the repository is to be archived. Add a deprecation notice at the top
of the README pointing to the replacement, with migration notes: the
input, secret and variable names carry over, but the new action's
AUTOMATION_ONLY input defaults to true and closes human-authored pull
requests unless set to false.

Correct the credential guidance before archiving, since the README
will remain readable afterwards:

- GERRIT_SSH_PRIVKEY_G2G said the *private* key is added to the
  Gerrit user's account settings. It is the public key that Gerrit
  holds; following the old text would disclose the private key.
- All values, including the private key, were to be stored as
  organization or repository variables. The key must be a secret;
  variables are not masked in logs.
- The prerequisites linked to the guide for registering a personal
  key and asked for a GitHub account that submits to Gerrit. Describe
  the Gerrit service account instead, and how an administrator
  registers its public key (REST API or gerrit set-account), since
  the web UI only manages the signed-in user's own keys.
- REVIEWER_EMAIL is corrected to REVIEWERS_EMAIL, the input name the
  action and reusable workflow define.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>

This comment was marked as outdated.

Copilot: the deprecation notice presented the replacement as a
drop-in swap, but a plain "uses:" change silently alters behavior.
List every difference, each verified against both action.yaml files:

- AUTOMATION_ONLY defaults to true (closes human-authored PRs).
- PRESERVE_GITHUB_PRS defaults to true, leaving PRs open after their
  changes reach Gerrit; this action always closed them. Tell users to
  set it to false to keep that behavior.
- The ISSUEID variable and inject-issue-id-action give way to the
  ISSUE_ID and ISSUE_ID_LOOKUP_JSON inputs.
- The composite action outputs url and change_number become
  gerrit_change_request_url and gerrit_change_request_num.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>

This comment was marked as outdated.

The example caller workflows were disabled with a literal "if: false".
actionlint v1.7.11 adds the if-cond rule, which rejects constant
conditions, so pre-commit.ci has failed on main and on every pull
request since the lfit#57 autoupdate.

Gate each job on the G2G_RUN_EXAMPLE_WORKFLOWS repository variable
instead. The jobs stay skipped unless the variable is set to 'true',
and the opt-in is explicit rather than "remove this line to enable".

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The documentation matches the replacement interfaces, and the workflow and Prettier changes correctly address the stated CI failures.

Review effort: Balanced
Findings: None

@tykeal
tykeal disabled auto-merge September 29, 2026 16:37
@tykeal
tykeal merged commit bfafd19 into lfit:main Sep 29, 2026
15 checks passed
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions deleted the docs/deprecate-for-github2gerrit-action branch September 30, 2026 09:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants