feat(gitlab): CI/CD Catalog packaging (release pipeline + component include)#95
Draft
factory-nizar wants to merge 2 commits into
Draft
feat(gitlab): CI/CD Catalog packaging (release pipeline + component include)#95factory-nizar wants to merge 2 commits into
factory-nizar wants to merge 2 commits into
Conversation
Adds GitLab support for `@droid fill` via the three native pipeline-
firing surfaces that don't require a webhook receiver: MR description,
MR title, and labels. Plus an `automatic_fill` always-on mode.
How the trigger works:
* `automatic_fill: "true"` -> droid-fill runs on every MR event
and decides to fill based on description content.
* `@droid fill` in MR title -> matched at rule level via
$CI_MERGE_REQUEST_TITLE.
* `droid:fill` label -> matched at rule level via
$CI_MERGE_REQUEST_LABELS.
* `@droid fill` in MR description -> not matchable at rule level
(description isn't in env), so the job runs and exits early via
state file if no match found in title/labels and the description
fetched from the API doesn't contain the phrase.
After fill completes the prompt instructs the model to strip the
`@droid fill` token from the new description so the next
`merge_request_event` (fired by our own update) does not re-fire fill.
Discussion-comment triggers (`@droid fill` posted as a note on the
MR) still require a webhook receiver because GitLab does not fire CI
on note events. That subset is deliberately deferred.
Files:
* `gitlab/templates/fill.yml` — new GitLab CI/CD Component with
one `droid-fill` job, three trigger rules, MCP registration,
`.droid-debug/` artifact staging.
* `src/gitlab/validation/trigger.ts` — port of GitHub's
`checkContainsTrigger` for the fill path with
`checkContainsFillTrigger` + `stripFillTrigger`.
* `src/gitlab/prompts/fill.ts` — fill prompt mirroring the GitHub
`fill-prompt.ts` but writing back via
`gitlab_mr___update_mr_description` instead of
`github_pr___update_pr_description`.
* `src/entrypoints/gitlab-fill-prepare.ts` — single-pass prepare
that reads the MR description via API, checks the trigger, and
writes the fill prompt + state file.
* `src/gitlab/context.ts` — adds `automaticFill` input and
`mr.labels` parsed from `CI_MERGE_REQUEST_LABELS`.
Tests: 24 new tests across `fill-trigger.test.ts` and
`fill-prompt.test.ts`. 469 pass, typecheck clean.
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Add root .gitlab-ci.yml that validates the component templates and publishes a CI/CD Catalog release on semver tags (runs only on the gitlab.com mirror, factory-components/droid-action). Point the runtime clone (droid_action_repo) at the GitLab mirror so consumer jobs have no github.com dependency, and show the preferred 'include: component:' Catalog form in the example, keeping the local-copy fallback. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
4e981ba to
459080a
Compare
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.
Stacked on #94 (feat/gitlab-fill).
Summary
Packages the GitLab component for the CI/CD Catalog and wires the gitlab.com mirror.
What ships
.gitlab-ci.ymlon the mirror: validatestemplates/*.ymland publishes a Catalog release on semver tags (no droid-review job runs here).include: component: gitlab.com/factory-components/droid-action/droid-review@<ver>form, keeping the local-copy fallback.droid_action_repo) now defaults to the GitLab mirror (factory-components/droid-action) so consumer jobs have no github.com dependency.Infra (done out-of-band)
factory-components, projectfactory-components/droid-action, native Premium pull-mirror from github.com/Factory-AI/droid-action (seeded).Deferred / gated
v1.0.0tag / production publish — gated on feat(gitlab): Phase 1 GitLab support via CI/CD Component #93 → feat(gitlab): add @droid fill mode (native parity, no webhook receiver) #94 → this merging.Tests