Skip to content

Commit

Permalink
added cncnf repo name
Browse files Browse the repository at this point in the history
Signed-off-by: Dipankar Das <[email protected]>
  • Loading branch information
dipankardas011 committed Jun 11, 2024
1 parent 9bb555b commit 06669ee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/repo-variable-writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ type StatePersistentFactory interface {
}

const (
LocProjMeta string = "../projects/project.json"
FullRepoName string = "dipankardas011/test-vars"
// FullRepoName string = "cncf-tags/green-reviews-tooling"
LocProjMeta string = "../projects/project.json"
)

func toPtr[T any](v T) *T {
Expand Down Expand Up @@ -99,7 +97,8 @@ func fetchLatestRelease(org, proj string) (*string, error) {
}

type GithubVariable struct {
gh_token string
gh_token string
fullRepoName string
}

func NewGithubVariable() (*GithubVariable, error) {
Expand All @@ -109,14 +108,14 @@ func NewGithubVariable() (*GithubVariable, error) {
if !ok || len(v) == 0 {
return nil, fmt.Errorf("the environment variable for github pat is missing")
}
return &GithubVariable{gh_token: v}, nil
return &GithubVariable{gh_token: v, fullRepoName: "cncf-tags/green-reviews-tooling"}, nil
}

func (obj *GithubVariable) genUrlAndHeaders(proj string) (*string, map[string]string, error) {
variableURI := strings.ToLower(proj) + "_version"
url := fmt.Sprintf(
"https://api.github.com/repos/%s/actions/variables/%s",
FullRepoName,
obj.fullRepoName,
variableURI,
)

Expand Down

0 comments on commit 06669ee

Please sign in to comment.