Skip to content

Commit 3547a6e

Browse files
chore: added github action custom detector name (#3417)
* [detector] feat: added rootly detector * chore: fixed to show name in detector action on github * Revert "[detector] feat: added rootly detector" This reverts commit 1fcff0a. --------- Co-authored-by: Kashif Khan <[email protected]>
1 parent 28d172f commit 3547a6e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkg/output/github_actions.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,14 @@ func (p *GitHubActionsPrinter) Print(_ context.Context, r *detectors.ResultWithM
6060
}
6161
dedupeCache[key] = struct{}{}
6262

63-
message := fmt.Sprintf("Found %s %s result 🐷🔑\n", verifiedStatus, out.DetectorType)
63+
name := ""
64+
if nameValue, ok := r.Result.ExtraData["name"]; ok {
65+
name = fmt.Sprintf(" (%s)", nameValue)
66+
}
67+
68+
message := fmt.Sprintf("Found %s %s%s result 🐷🔑\n", verifiedStatus, out.DetectorType, name)
6469
if r.DecoderType != detectorspb.DecoderType_PLAIN {
65-
message = fmt.Sprintf("Found %s %s result with %s encoding 🐷🔑\n", verifiedStatus, out.DetectorType, out.DecoderType)
70+
message = fmt.Sprintf("Found %s %s%s result with %s encoding 🐷🔑\n", verifiedStatus, out.DetectorType, name, out.DecoderType)
6671
}
6772

6873
fmt.Printf("::warning file=%s,line=%d,endLine=%d::%s",

0 commit comments

Comments
 (0)