You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7216b66
Browse filesBrowse the repository at this point in the historyBrowse files
Add a --pr flag to chainloop attestation init that marks an attestation
as originating from a pull/merge request build. When PR mode is active:
- Sets the chainloop.dev/is-pull-request=true annotation on the
attestation so downstream consumers can detect and skip processing.
- Defaults mark-latest=false to skip latest version promotion, replacing
the manual --mark-latest=false workaround. An explicit
--mark-latest=true still wins.
PR mode is auto-detected from the CI runner environment (GitHub Actions
GITHUB_EVENT_NAME=pull_request, GitLab CI_PIPELINE_SOURCE=merge_request_event)
and can be explicitly overridden via --pr/--pr=false.
Fixes#3265
Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Chainloop-Trace-Sessions: ses_0c7fc994cffe1d68UjAPS6QDNj
cmd.Flags().BoolVar(&existingVersion, "existing-version", false, "return an error if the version doesn't exist in the project")
195
202
cmd.Flags().StringSliceVar(&collectors, "collectors", nil, "comma-separated list of additional collectors to enable (e.g. aiconfig)")
196
203
cmd.Flags().BoolVar(&markAsLatest, "mark-latest", true, "explicitly mark the project version as latest (default: automatic for new versions; use =false to skip promotion)")
204
+
cmd.Flags().BoolVar(&prMode, "pr", false, "mark this attestation as a pull/merge request build (skips latest promotion and sets the chainloop.dev/is-pull-request annotation; auto-detected from CI env if not set)")
Copy file name to clipboardExpand all lines: app/cli/documentation/cli-reference.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -348,6 +348,7 @@ Options
348
348
-h, --help help for init
349
349
--latest-version use the latest existing project version instead of specifying one
350
350
--mark-latest explicitly mark the project version as latest (default: automatic for new versions; use =false to skip promotion) (default true)
351
+
--pr mark this attestation as a pull/merge request build (skips latest promotion and sets the chainloop.dev/is-pull-request annotation; auto-detected from CI env if not set)
351
352
--project string name of the project of this workflow
352
353
--release promote the provided version as a release
353
354
--remote-state Store the attestation state remotely
0 commit comments