Skip to content

Commit

Permalink
added in rate check
Browse files Browse the repository at this point in the history
  • Loading branch information
samueljmello committed Jul 24, 2023
1 parent 3fd1c93 commit bbe3426
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var (
Use: "gh pma",
Short: Description,
Long: Description,
Version: "0.0.4",
Version: "0.0.5",
SilenceUsage: true,
SilenceErrors: true,
RunE: Process,
Expand Down Expand Up @@ -938,6 +938,12 @@ func ProcessRepositoryVisibilities(client api.RESTClient, targetOrg string, repo
var response interface{}
for _, repository := range reposToProcess {

// validate rate
err := ValidateApiRate(client, "core")
if err != nil {
return err
}

// create json body
requestbody, err := json.Marshal(map[string]string{
"visibility": strings.ToLower(repository.Visibility),
Expand Down

0 comments on commit bbe3426

Please sign in to comment.