Repository navigation
feat: GitLab module-CI (shared core + GitLab template) - #20
Merged
Merged
Conversation
Extracts the raptor-driving logic from module-ci-action into a shared script both GitHub and GitLab call, driven by a generic env contract (MODE, CI_DIFF_RANGE, CI_HEAD_SHA, CI_OWNER_SHAS, PATH_PREFIX, raptor creds). No logic duplicated across hosts. Install-if-missing so it runs in CI and locally. shellcheck-clean. Verified live against facetsdemo: preview (validate+register), publish (upload+compat-declaration+publish), cleanup (ownership-checked delete), and failure gating all pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The 776-line inlined action is now thin glue: resolve mode + map the GitHub event to the generic env contract, resolve PR commit SHAs for cleanup, run the shared core, and post the PR preview comment (if: always() so a gated failure still comments). All raptor-driving logic lives in module-ci-core.sh. action.yml parses + every embedded script is shellcheck-clean (the repo's CI bar). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…oot-safety - module-ci-gitlab/template.gitlab-ci.yml: thin GitLab glue mapping GitLab CI vars to the generic MC_* contract, fetching + running the shared core, posting the MR preview note in after_script (runs even when the core gates). Preview + publish supported; cleanup-on-close deferred (GitLab runs no pipeline on MR close). - Rename the generic contract vars CI_* -> MC_* (CI_ is GitLab's reserved prefix). - Core install is root-safe (GitLab containers run as root without sudo). - README + test workflow (YAML parse + shellcheck), mirroring module-ci-action. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
anujhydrabadi
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The GitLab counterpart of
module-ci-action, plus a shared core so the two hosts never drift.module-ci-core.sh(new) — host-neutral logic (install raptor/tf/trivy, detect changed modules/outputs, preview/publish/cleanup, markdown), driven by a genericMC_*env contract.module-ci-action/action.yml— refactored (−675 lines) to resolve mode + map the GitHub event to the contract, then call the shared core. Behaviour-preserving.module-ci-gitlab/(new) — the GitLab CI template: thin glue mapping GitLab's CI vars to the contract, fetching + running the core, posting the MR preview note. README included.Tested
module-ci-core.shshellcheck-clean;action.ymlparses + every embedded script shellcheck-clean (the repo's CI bar).Notes for review
module-ci-action— a behaviour-preserving refactor to share the core (verified againstpr.json/push.json+ shellcheck)..github/workflows/test-module-ci-gitlab.yamlcouldn't be pushed from my token (missingworkflowscope); needs adding by someone with scope.include: remote:(raw GitHub URL, pinnedv1). OK, or prefer a Docker image?🤖 Generated with Claude Code