Skip to content

Commit 2cc4cc2

Browse files
Add branch prefix to scope labels, use signed tags
- Prefix "branch " to scope labels in issues, metrics, reportcard, and vulnerabilities commands so output reads "branch main" instead of "main" - Switch deploy tags from annotated (-a) to signed (-s) in justfile
1 parent 849d86a commit 2cc4cc2

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

command/issues/issues.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,13 @@ func (opts *IssuesOptions) scopeLabel() string {
474474
switch {
475475
case opts.autoDetectedBranch != "":
476476
if opts.CommitOid == "" {
477-
return opts.autoDetectedBranch
477+
return "branch " + opts.autoDetectedBranch
478478
}
479479
short := opts.CommitOid
480480
if len(short) > 8 {
481481
short = short[:8]
482482
}
483-
return opts.autoDetectedBranch + " (" + short + ")"
483+
return "branch " + opts.autoDetectedBranch + " (" + short + ")"
484484
case opts.CommitOid != "":
485485
short := opts.CommitOid
486486
if len(short) > 8 {

command/metrics/metrics.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,13 @@ func (opts *MetricsOptions) scopeLabel() string {
292292
switch {
293293
case opts.autoDetectedBranch != "":
294294
if opts.CommitOid == "" {
295-
return opts.autoDetectedBranch
295+
return "branch " + opts.autoDetectedBranch
296296
}
297297
commitShort := opts.CommitOid
298298
if len(commitShort) > 8 {
299299
commitShort = commitShort[:8]
300300
}
301-
return fmt.Sprintf("%s (%s)", opts.autoDetectedBranch, commitShort)
301+
return fmt.Sprintf("branch %s (%s)", opts.autoDetectedBranch, commitShort)
302302
case opts.runMetrics != nil:
303303
commitShort := opts.runMetrics.CommitOid
304304
if len(commitShort) > 7 {

command/reportcard/reportcard.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func (opts *ReportCardOptions) scopeLabel() string {
300300
if len(commitShort) > 8 {
301301
commitShort = commitShort[:8]
302302
}
303-
return fmt.Sprintf("%s (%s)", opts.branchName, commitShort)
303+
return fmt.Sprintf("branch %s (%s)", opts.branchName, commitShort)
304304
case opts.CommitOid != "":
305305
commitShort := opts.CommitOid
306306
if len(commitShort) > 8 {

command/vulnerabilities/vulnerabilities.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ func (opts *VulnerabilitiesOptions) scopeLabel() string {
304304
switch {
305305
case opts.autoDetectedBranch != "":
306306
if opts.CommitOid == "" {
307-
return opts.autoDetectedBranch
307+
return "branch " + opts.autoDetectedBranch
308308
}
309309
commitShort := opts.CommitOid
310310
if len(commitShort) > 8 {
311311
commitShort = commitShort[:8]
312312
}
313-
return fmt.Sprintf("%s (%s)", opts.autoDetectedBranch, commitShort)
313+
return fmt.Sprintf("branch %s (%s)", opts.autoDetectedBranch, commitShort)
314314
case opts.runVulns != nil:
315315
commitShort := opts.runVulns.CommitOid
316316
if len(commitShort) > 7 {

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ deploy-prod:
6969
version=$(cat VERSION)
7070
tag="v${version}"
7171
echo "Creating tag ${tag}..."
72-
git tag -a "${tag}" -m "Release ${tag}"
72+
git tag -s "${tag}" -m "Release ${tag}"
7373
git push origin "${tag}"
7474
echo "Pushed ${tag} — build-and-deploy workflow triggered"
7575

@@ -81,6 +81,6 @@ deploy-dev:
8181
hash=$(git rev-parse --short HEAD)
8282
tag="v${version}-${hash}"
8383
echo "Creating dev tag ${tag}..."
84-
git tag -a "${tag}" -m "Dev release ${tag}"
84+
git tag -s "${tag}" -m "Dev release ${tag}"
8585
git push origin "${tag}"
8686
echo "Pushed ${tag} — dev build-and-deploy workflow triggered"

0 commit comments

Comments
 (0)