Skip to content

fix: correct mirror action SHA#15

Merged
thedavidweng merged 1 commit into
mainfrom
fix/mirror-action-sha
Jun 20, 2026
Merged

fix: correct mirror action SHA#15
thedavidweng merged 1 commit into
mainfrom
fix/mirror-action-sha

Conversation

@thedavidweng

Copy link
Copy Markdown
Owner

Fix cssnr/mirror-repository-action commit SHA (was invalid).

@thedavidweng thedavidweng merged commit e282135 into main Jun 20, 2026
1 check failed
@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes the commit SHA for cssnr/mirror-repository-action (the previous SHA 4e3e1a67... was invalid) and simultaneously pins actions/checkout to a full commit hash instead of the mutable @v4 tag. However, it also removes the fetch-depth: 0 option from the checkout step, which is a functional regression for the mirroring workflow.

  • SHA fix: The new cssnr/mirror-repository-action SHA (2af5bf34...) is confirmed valid — it corresponds to v1.2.0 and appears in cssnr's own mirror workflows.
  • Checkout pinning: actions/checkout is now pinned to a full commit SHA (34e114876b...) with a # v4 comment, which is a security improvement over the mutable @v4 tag.
  • Dropped fetch-depth: 0: This option was present in the original workflow and is required by cssnr/mirror-repository-action to push complete repository history to Codeberg; without it, only the latest shallow commit is available to mirror.

Confidence Score: 3/5

Safe to merge only after restoring fetch-depth: 0; the current state will cause Codeberg to receive incomplete repository history on every push.

The SHA correction is correct and verified, but the removal of fetch-depth: 0 is a real functional regression — every future push/tag event will mirror only the latest shallow commit to Codeberg instead of the full history. The action's own upstream example workflow explicitly requires this flag.

.github/workflows/mirror.yml — the checkout step is missing fetch-depth: 0.

Important Files Changed

Filename Overview
.github/workflows/mirror.yml Corrects the cssnr/mirror-repository-action SHA (confirmed valid via cssnr's own workflows) and pins actions/checkout to a commit hash, but inadvertently drops fetch-depth: 0, which is required for complete history mirroring.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant GH as GitHub (push/tag)
    participant Runner as ubuntu-latest runner
    participant Checkout as actions/checkout
    participant Mirror as cssnr/mirror-repository-action
    participant Codeberg as Codeberg

    GH->>Runner: Trigger workflow (push or tag)
    Runner->>Checkout: Checkout repo (SHA-pinned)
    note over Checkout: fetch-depth: 0 removed<br/>(shallow clone, depth=1)
    Checkout-->>Runner: Shallow working tree
    Runner->>Mirror: Mirror to Codeberg (SHA-pinned)
    Mirror->>Codeberg: git push (only HEAD commit available)
    note over Codeberg: Full history NOT mirrored<br/>without fetch-depth: 0
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant GH as GitHub (push/tag)
    participant Runner as ubuntu-latest runner
    participant Checkout as actions/checkout
    participant Mirror as cssnr/mirror-repository-action
    participant Codeberg as Codeberg

    GH->>Runner: Trigger workflow (push or tag)
    Runner->>Checkout: Checkout repo (SHA-pinned)
    note over Checkout: fetch-depth: 0 removed<br/>(shallow clone, depth=1)
    Checkout-->>Runner: Shallow working tree
    Runner->>Mirror: Mirror to Codeberg (SHA-pinned)
    Mirror->>Codeberg: git push (only HEAD commit available)
    note over Codeberg: Full history NOT mirrored<br/>without fetch-depth: 0
Loading

Fix All in Claude Code Fix All in Codex Fix All in Cursor

Reviews (1): Last reviewed commit: "fix: correct mirror action SHA" | Re-trigger Greptile

Comment on lines 19 to +20
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Missing fetch-depth: 0 breaks full-history mirroring

The fetch-depth: 0 option was dropped from the actions/checkout step. Without it, GitHub Actions performs a shallow clone (depth=1), so only the latest commit tip is available locally. The cssnr/mirror-repository-action pushes from this checked-out repo — the official example workflow from cssnr itself explicitly uses fetch-depth: 0 alongside this very action. Without it, Codeberg will receive only the HEAD commit of each pushed branch/tag rather than the full repository history.

Suggested change
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

Fix in Claude Code Fix in Codex Fix in Cursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant