Skip to content

Commit cb1c52a

Browse files
committed
fix
1 parent 3cc0780 commit cb1c52a

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

tools/flakeguard/cmd/get_gh_artifact_link.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@ import (
1313
"golang.org/x/oauth2"
1414
)
1515

16-
const (
17-
exampleGitHubToken = "EXAMPLE_GITHUB_TOKEN" //nolint:gosec
18-
)
19-
2016
// GetGHArtifactLinkCmd fetches the artifact link from GitHub API.
2117
var GetGHArtifactLinkCmd = &cobra.Command{
2218
Use: "get-gh-artifact",
23-
Short: "Fetch artifact link from GitHub API",
19+
Short: "Get artifact link from GitHub API",
2420
Run: func(cmd *cobra.Command, args []string) {
2521
// Get flag values
2622
githubRepo, _ := cmd.Flags().GetString("github-repository")
@@ -62,10 +58,6 @@ func init() {
6258

6359
// fetchArtifactLink uses the GitHub API to retrieve the artifact link.
6460
func fetchArtifactLink(githubToken, githubRepo string, githubRunID int64, artifactName string) (string, error) {
65-
// If using the example token, return a fake link.
66-
if githubToken == exampleGitHubToken {
67-
return "https://example-artifact-link.com", nil
68-
}
6961
ctx := context.Background()
7062
ts := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: githubToken})
7163
tc := oauth2.NewClient(ctx, ts)

0 commit comments

Comments
 (0)