Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
feat: add GitHub actions context (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimabru authored Nov 16, 2022
1 parent 04fc93c commit 8873498
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/validate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package validate
import (
"errors"
"fmt"
"os"
"path/filepath"

"github.com/allero-io/allero/pkg/configurationManager"
Expand Down Expand Up @@ -73,6 +74,10 @@ allero validate ~/my-repo-dir Validate over local directory`,
if decodedToken != nil {
args["User Email"] = decodedToken.Email
}

args["Github Actor"] = os.Getenv("GITHUB_ACTOR")
args["Github Repository"] = os.Getenv("GITHUB_REPOSITORY")

deps.PosthogClient.PublishEventWithArgs("data validated", args)
},
Run: cmdWrap.Run(func(cmd *cobra.Command, args []string) error {
Expand Down

0 comments on commit 8873498

Please sign in to comment.