Skip to content

Commit 59a480c

Browse files
committed
fix(labels): use positive check for InstallationID
Change InstallationID validation from != -1 to > 0 for better semantic correctness. Signed-off-by: Akshay Pant <akshay.akshaypant@gmail.com>
1 parent c2c43a9 commit 59a480c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kubeinteraction/labels.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func AddLabelsAndAnnotations(event *info.Event, pipelineRun *tektonv1.PipelineRu
6666

6767
// TODO: move to provider specific function
6868
if providerConfig.Name == "github" || providerConfig.Name == "github-enterprise" {
69-
if event.InstallationID != -1 {
69+
if event.InstallationID > 0 {
7070
annotations[keys.InstallationID] = strconv.FormatInt(event.InstallationID, 10)
7171
}
7272
if event.GHEURL != "" {

0 commit comments

Comments
 (0)