Repository navigation
Detect GitLab CI and GitLab repository paths - #85
Merged
Merged
Conversation
GitLab CI jobs now report git_provider=gitlab, the project's full path (nested groups included), the merge request's diff base or the push's previous commit as base_sha, and the commit author. gitlab.com remotes on RWX, Buildkite, CircleCI and a local origin yield the path too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NF6U1zN1NHcXS5REazSa7N
GitLab reports CI_MERGE_REQUEST_SOURCE_BRANCH_SHA as head_sha, so a merged results pipeline names the branch's commit rather than its merge commit, as main now does for GitHub pull requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LGDurUszQi6JSNKWbT81U1
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.
Companion to selectiveci/selective#464, which adds GitLab as a code host. The runner needs to tell the server which GitLab project a run belongs to.
Changes
GITLAB_CI): sendsplatform=gitlab_ciandgit_provider=gitlab, plus:git_repo_full_namefromCI_PROJECT_PATH, including nested groupsbase_sha:CI_MERGE_REQUEST_DIFF_BASE_SHAon merge request pipelines,CI_COMMIT_BEFORE_SHAon branch pipelines; an all-zero sha counts as no baseCI_COMMIT_AUTHORrun_id,CI_NODE_INDEXasrunner_idhead_shafromCI_MERGE_REQUEST_SOURCE_BRANCH_SHAon merged results pipelines, whereCI_COMMIT_SHAis GitLab's merge commit (the same fix main made for GitHub pull requests)origin) now produce the GitLab path instead of an empty slug. Bitbucket and other unsupported hosts still get no slug.SELECTIVE_GIT_PROVIDERandSELECTIVE_GIT_REPOstill override.Known limit
GitLab has no run-attempt counter, so
run_attemptis1. Retrying a single failed job reuses its pipeline's run; re-running the pipeline starts a new one.Release
Merge after selectiveci/selective#464 (merged) is deployed, then release with the
gem-releaseflow.🤖 Generated with Claude Code
https://claude.ai/code/session_01NF6U1zN1NHcXS5REazSa7N