diff --git a/.ci/magician/cmd/SCHEDULED_PR_WAITING_FOR_REVIEW.md.tmpl b/.ci/magician/cmd/SCHEDULED_PR_WAITING_FOR_REVIEW.md.tmpl index 83f1fab90359..7a03536e2872 100644 --- a/.ci/magician/cmd/SCHEDULED_PR_WAITING_FOR_REVIEW.md.tmpl +++ b/.ci/magician/cmd/SCHEDULED_PR_WAITING_FOR_REVIEW.md.tmpl @@ -1 +1 @@ -{{if ge .SinceDays 5}}@GoogleCloudPlatform/terraform-team {{end}}{{range .CoreReviewers}}@{{ . }} {{end}}This PR has been waiting for review for {{if lt .SinceDays 5}}{{.SinceDays}} weekdays{{else if eq .SinceDays 5}}1 week{{else}}{{weekdaysToWeeks .SinceDays}} weeks{{end}}. Please take a look! Use the label `disable-review-reminders` to disable these notifications. \ No newline at end of file +{{if ge .SinceDays 5}}@trodge/terraform-team {{end}}{{range .CoreReviewers}}@{{ . }} {{end}}This PR has been waiting for review for {{if lt .SinceDays 5}}{{.SinceDays}} weekdays{{else if eq .SinceDays 5}}1 week{{else}}{{weekdaysToWeeks .SinceDays}} weeks{{end}}. Please take a look! Use the label `disable-review-reminders` to disable these notifications. \ No newline at end of file diff --git a/.ci/magician/cmd/generate_comment.go b/.ci/magician/cmd/generate_comment.go index f1a963d8f3f9..e5fc04b6b104 100644 --- a/.ci/magician/cmd/generate_comment.go +++ b/.ci/magician/cmd/generate_comment.go @@ -31,7 +31,7 @@ import ( "magician/provider" "magician/source" - "github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler/labeler" + "github.com/trodge/magic-modules/tools/issue-labeler/labeler" "github.com/spf13/cobra" "golang.org/x/exp/maps" diff --git a/.ci/magician/cmd/generate_downstream.go b/.ci/magician/cmd/generate_downstream.go index 5a056dafef55..0311a6688bde 100644 --- a/.ci/magician/cmd/generate_downstream.go +++ b/.ci/magician/cmd/generate_downstream.go @@ -196,7 +196,7 @@ func cloneRepo(mmRepo *source.Repo, baseBranch, repo, version, command, ref stri downstreamRepo.Owner = "hashicorp" case "terraform-google-conversion": downstreamRepo.Name = "terraform-google-conversion" - downstreamRepo.Owner = "GoogleCloudPlatform" + downstreamRepo.Owner = "trodge" case "tf-oics": if downstreamRepo.Branch == "main" { downstreamRepo.Branch = "master" diff --git a/.ci/magician/cmd/request_service_reviewers.go b/.ci/magician/cmd/request_service_reviewers.go index c9f335408cad..e2fbe914d797 100644 --- a/.ci/magician/cmd/request_service_reviewers.go +++ b/.ci/magician/cmd/request_service_reviewers.go @@ -21,7 +21,7 @@ import ( "math/rand" "strings" - "github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler/labeler" + "github.com/trodge/magic-modules/tools/issue-labeler/labeler" "github.com/spf13/cobra" "gopkg.in/yaml.v2" ) @@ -108,9 +108,9 @@ func execRequestServiceReviewers(prNumber string, gh GithubClient, enrolledTeams exitCode := 0 for githubTeam := range githubTeamsSet { - members, err := gh.GetTeamMembers("GoogleCloudPlatform", githubTeam) + members, err := gh.GetTeamMembers("trodge", githubTeam) if err != nil { - fmt.Printf("Error fetching members for GoogleCloudPlatform/%s: %s", githubTeam, err) + fmt.Printf("Error fetching members for trodge/%s: %s", githubTeam, err) exitCode = 1 continue } diff --git a/.ci/magician/cmd/scheduled_pr_reminders.go b/.ci/magician/cmd/scheduled_pr_reminders.go index 6cfac38f013c..f156c06677cf 100644 --- a/.ci/magician/cmd/scheduled_pr_reminders.go +++ b/.ci/magician/cmd/scheduled_pr_reminders.go @@ -81,7 +81,7 @@ func execScheduledPrReminders(gh *github.Client) error { for { pulls, resp, err := gh.PullRequests.List( ctx, - "GoogleCloudPlatform", + "trodge", "magic-modules", opt, ) @@ -110,7 +110,7 @@ func execScheduledPrReminders(gh *github.Client) error { for { events, resp, err := gh.Issues.ListIssueEvents( ctx, - "GoogleCloudPlatform", + "trodge", "magic-modules", *pr.Number, eventsOpt, @@ -130,7 +130,7 @@ func execScheduledPrReminders(gh *github.Client) error { for { reviews, resp, err := gh.PullRequests.ListReviews( ctx, - "GoogleCloudPlatform", + "trodge", "magic-modules", *pr.Number, reviewsOpt, @@ -181,7 +181,7 @@ func execScheduledPrReminders(gh *github.Client) error { } else { _, _, err := gh.Issues.CreateComment( ctx, - "GoogleCloudPlatform", + "trodge", "magic-modules", *pr.Number, &github.IssueComment{ @@ -200,7 +200,7 @@ func execScheduledPrReminders(gh *github.Client) error { } else { _, _, err := gh.Issues.Edit( ctx, - "GoogleCloudPlatform", + "trodge", "magic-modules", *pr.Number, &github.IssueRequest{ diff --git a/.ci/magician/cmd/scheduled_pr_reminders_test.go b/.ci/magician/cmd/scheduled_pr_reminders_test.go index 760cf6e9fb60..042b338621e2 100644 --- a/.ci/magician/cmd/scheduled_pr_reminders_test.go +++ b/.ci/magician/cmd/scheduled_pr_reminders_test.go @@ -882,7 +882,7 @@ func TestFormatReminderComment(t *testing.T) { "@" + secondCoreReviewer, }, notExpectedStrings: []string{ - "@GoogleCloudPlatform/terraform-team", + "@trodge/terraform-team", "@pr-author", "@other-reviewer", }, @@ -899,7 +899,7 @@ func TestFormatReminderComment(t *testing.T) { state: waitingForReview, sinceDays: 5, expectedStrings: []string{ - "@GoogleCloudPlatform/terraform-team", + "@trodge/terraform-team", "waiting for review for 1 week", "disable-review-reminders", "@" + firstCoreReviewer, @@ -922,7 +922,7 @@ func TestFormatReminderComment(t *testing.T) { state: waitingForReview, sinceDays: 10, expectedStrings: []string{ - "@GoogleCloudPlatform/terraform-team", + "@trodge/terraform-team", "waiting for review for 2 weeks", "disable-review-reminders", "@" + firstCoreReviewer, diff --git a/.ci/magician/cmd/sync_branch.go b/.ci/magician/cmd/sync_branch.go index d3950b268235..50457b0141fb 100644 --- a/.ci/magician/cmd/sync_branch.go +++ b/.ci/magician/cmd/sync_branch.go @@ -63,7 +63,7 @@ func execSyncBranchCmd(syncBranchPrefix, baseBranch, sha, githubToken string, ru return nil } - _, err := runner.Run("git", []string{"push", fmt.Sprintf("https://modular-magician:%s@github.com/GoogleCloudPlatform/magic-modules", githubToken), fmt.Sprintf("%s:%s", sha, syncBranch)}, nil) + _, err := runner.Run("git", []string{"push", fmt.Sprintf("https://modular-magician:%s@github.com/trodge/magic-modules", githubToken), fmt.Sprintf("%s:%s", sha, syncBranch)}, nil) return err } diff --git a/.ci/magician/github/get.go b/.ci/magician/github/get.go index 4b1409460639..7e8b177b2e3c 100644 --- a/.ci/magician/github/get.go +++ b/.ci/magician/github/get.go @@ -39,7 +39,7 @@ type PullRequest struct { } func (gh *Client) GetPullRequest(prNumber string) (PullRequest, error) { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/issues/%s", prNumber) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/issues/%s", prNumber) var pullRequest PullRequest @@ -49,7 +49,7 @@ func (gh *Client) GetPullRequest(prNumber string) (PullRequest, error) { } func (gh *Client) GetPullRequests(state, base, sort, direction string) ([]PullRequest, error) { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/pulls?state=%s&base=%s&sort=%s&direction=%s", state, base, sort, direction) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/pulls?state=%s&base=%s&sort=%s&direction=%s", state, base, sort, direction) var pullRequests []PullRequest @@ -59,7 +59,7 @@ func (gh *Client) GetPullRequests(state, base, sort, direction string) ([]PullRe } func (gh *Client) GetPullRequestRequestedReviewers(prNumber string) ([]User, error) { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/pulls/%s/requested_reviewers", prNumber) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/pulls/%s/requested_reviewers", prNumber) var requestedReviewers struct { Users []User `json:"users"` @@ -74,7 +74,7 @@ func (gh *Client) GetPullRequestRequestedReviewers(prNumber string) ([]User, err } func (gh *Client) GetPullRequestPreviousReviewers(prNumber string) ([]User, error) { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/pulls/%s/reviews", prNumber) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/pulls/%s/reviews", prNumber) var reviews []struct { User User `json:"user"` diff --git a/.ci/magician/github/membership.go b/.ci/magician/github/membership.go index c627cc14624a..8af6597a02c2 100644 --- a/.ci/magician/github/membership.go +++ b/.ci/magician/github/membership.go @@ -162,7 +162,7 @@ func (gh *Client) GetUserType(user string) UserType { return CoreContributorUserType } - if isOrgMember(user, "GoogleCloudPlatform", gh.token) { + if isOrgMember(user, "trodge", gh.token) { fmt.Println("User is a GCP org member") return GooglerUserType } diff --git a/.ci/magician/github/set.go b/.ci/magician/github/set.go index fcc430bb0c11..f34e41f3946f 100644 --- a/.ci/magician/github/set.go +++ b/.ci/magician/github/set.go @@ -21,7 +21,7 @@ import ( ) func (gh *Client) PostBuildStatus(prNumber, title, state, targetURL, commitSha string) error { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/%s", commitSha) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/statuses/%s", commitSha) postBody := map[string]string{ "context": title, @@ -40,7 +40,7 @@ func (gh *Client) PostBuildStatus(prNumber, title, state, targetURL, commitSha s } func (gh *Client) PostComment(prNumber, comment string) error { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/issues/%s/comments", prNumber) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/issues/%s/comments", prNumber) body := map[string]string{ "body": comment, @@ -57,7 +57,7 @@ func (gh *Client) PostComment(prNumber, comment string) error { } func (gh *Client) RequestPullRequestReviewers(prNumber string, reviewers []string) error { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/pulls/%s/requested_reviewers", prNumber) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/pulls/%s/requested_reviewers", prNumber) body := map[string][]string{ "reviewers": reviewers, @@ -75,7 +75,7 @@ func (gh *Client) RequestPullRequestReviewers(prNumber string, reviewers []strin } func (gh *Client) AddLabels(prNumber string, labels []string) error { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/issues/%s/labels", prNumber) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/issues/%s/labels", prNumber) body := map[string][]string{ "labels": labels, @@ -91,7 +91,7 @@ func (gh *Client) AddLabels(prNumber string, labels []string) error { } func (gh *Client) RemoveLabel(prNumber, label string) error { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/issues/%s/labels/%s", prNumber, label) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/issues/%s/labels/%s", prNumber, label) err := utils.RequestCall(url, "DELETE", gh.token, nil, nil) if err != nil { @@ -102,7 +102,7 @@ func (gh *Client) RemoveLabel(prNumber, label string) error { } func (gh *Client) CreateWorkflowDispatchEvent(workflowFileName string, inputs map[string]any) error { - url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/actions/workflows/%s/dispatches", workflowFileName) + url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/actions/workflows/%s/dispatches", workflowFileName) err := utils.RequestCall(url, "POST", gh.token, nil, map[string]any{ "ref": "main", "inputs": inputs, diff --git a/.ci/magician/go.mod b/.ci/magician/go.mod index 26fd90e0cdeb..244921950709 100644 --- a/.ci/magician/go.mod +++ b/.ci/magician/go.mod @@ -2,10 +2,10 @@ module magician go 1.21 -replace github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler => ../../tools/issue-labeler +replace github.com/trodge/magic-modules/tools/issue-labeler => ../../tools/issue-labeler require ( - github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler v0.0.0-00010101000000-000000000000 + github.com/trodge/magic-modules/tools/issue-labeler v0.0.0-00010101000000-000000000000 github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 // indirect