Skip to content

fix(ci): resolve merged source PRs for signed submodule updates - #132

Merged
vitormattos merged 1 commit into
mainfrom
fix/submodule-pr-after-source-merge-20261122
Nov 22, 2026
Merged

vitormattos merged 1 commit into
mainfrom
fix/submodule-pr-after-source-merge-20261122

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Problem

/libresign-pr fails in the init job after the source 3rdparty PR was merged. The external xt0rted/pull-request-comment-branch action fails with Cannot read properties of null (reading 'name') (reproduced in 3rdparty run 45055678983). As a result, maintainers repeatedly have to create signed gitlink PRs by hand.

Fix (canonical workflow template)

  • Resolve same-repository PR metadata directly through the GitHub API, with validated source/base ref and SHA, rather than relying on branch discovery after deletion.
  • For an open source PR, stage the reviewed HEAD as before; for a merged source PR, stage its merged commit SHA, and generate the Composer diff relative to the merge commit's first parent.
  • Prevent regressions: reject closed-unmerged/fork/unsafe PRs, non-merge commits for merged paths, and merged SHAs that would move the target gitlink backward or sideways.
  • Revalidate source state and SHA just before publishing; refuse a source that merges in the middle of an open-PR run.
  • Keep workflow-template provenance: changes are represented by an additive patch in upstream/templates.json, rather than editing an upstream vendor snapshot.
  • Add nine Node regression tests to the existing tests workflow.

Verification

  • Focused resolver cases tested locally (8/8 before publication); full 9-case regression suite runs in this PR's CI.
  • Signed DCO commit: 793e69bb60031bbe90865f408b3742daf63a0e2e.
  • Required actionlint, rendered-template and workflow-policy CI must pass before merge.

After this is merged, the synchronized LibreSign/3rdparty consumer workflow and its local command-variable patch must be refreshed and validated, so the repair is not lost by weekly synchronization.

Resolve source PR revisions via GitHub API, pin merged gitlinks, reject obsolete references, and retain regression tests in canonical workflow templates.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos merged commit 53615d6 into main Nov 22, 2026
5 checks passed
@vitormattos
vitormattos deleted the fix/submodule-pr-after-source-merge-20261122 branch November 22, 2026 19:04
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