Skip to content

Commit b8c2800

Browse files
committed
Make all magician references to GoogleCloudPlatform refer instead to trodge
1 parent bf76ec3 commit b8c2800

11 files changed

+28
-28
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +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.
1+
{{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.

.ci/magician/cmd/generate_comment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"magician/provider"
3232
"magician/source"
3333

34-
"github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler/labeler"
34+
"github.com/trodge/magic-modules/tools/issue-labeler/labeler"
3535

3636
"github.com/spf13/cobra"
3737
"golang.org/x/exp/maps"

.ci/magician/cmd/generate_downstream.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func cloneRepo(mmRepo *source.Repo, baseBranch, repo, version, command, ref stri
196196
downstreamRepo.Owner = "hashicorp"
197197
case "terraform-google-conversion":
198198
downstreamRepo.Name = "terraform-google-conversion"
199-
downstreamRepo.Owner = "GoogleCloudPlatform"
199+
downstreamRepo.Owner = "trodge"
200200
case "tf-oics":
201201
if downstreamRepo.Branch == "main" {
202202
downstreamRepo.Branch = "master"

.ci/magician/cmd/request_service_reviewers.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"math/rand"
2222
"strings"
2323

24-
"github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler/labeler"
24+
"github.com/trodge/magic-modules/tools/issue-labeler/labeler"
2525
"github.com/spf13/cobra"
2626
"gopkg.in/yaml.v2"
2727
)
@@ -108,9 +108,9 @@ func execRequestServiceReviewers(prNumber string, gh GithubClient, enrolledTeams
108108

109109
exitCode := 0
110110
for githubTeam := range githubTeamsSet {
111-
members, err := gh.GetTeamMembers("GoogleCloudPlatform", githubTeam)
111+
members, err := gh.GetTeamMembers("trodge", githubTeam)
112112
if err != nil {
113-
fmt.Printf("Error fetching members for GoogleCloudPlatform/%s: %s", githubTeam, err)
113+
fmt.Printf("Error fetching members for trodge/%s: %s", githubTeam, err)
114114
exitCode = 1
115115
continue
116116
}

.ci/magician/cmd/scheduled_pr_reminders.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func execScheduledPrReminders(gh *github.Client) error {
8181
for {
8282
pulls, resp, err := gh.PullRequests.List(
8383
ctx,
84-
"GoogleCloudPlatform",
84+
"trodge",
8585
"magic-modules",
8686
opt,
8787
)
@@ -110,7 +110,7 @@ func execScheduledPrReminders(gh *github.Client) error {
110110
for {
111111
events, resp, err := gh.Issues.ListIssueEvents(
112112
ctx,
113-
"GoogleCloudPlatform",
113+
"trodge",
114114
"magic-modules",
115115
*pr.Number,
116116
eventsOpt,
@@ -130,7 +130,7 @@ func execScheduledPrReminders(gh *github.Client) error {
130130
for {
131131
reviews, resp, err := gh.PullRequests.ListReviews(
132132
ctx,
133-
"GoogleCloudPlatform",
133+
"trodge",
134134
"magic-modules",
135135
*pr.Number,
136136
reviewsOpt,
@@ -181,7 +181,7 @@ func execScheduledPrReminders(gh *github.Client) error {
181181
} else {
182182
_, _, err := gh.Issues.CreateComment(
183183
ctx,
184-
"GoogleCloudPlatform",
184+
"trodge",
185185
"magic-modules",
186186
*pr.Number,
187187
&github.IssueComment{
@@ -200,7 +200,7 @@ func execScheduledPrReminders(gh *github.Client) error {
200200
} else {
201201
_, _, err := gh.Issues.Edit(
202202
ctx,
203-
"GoogleCloudPlatform",
203+
"trodge",
204204
"magic-modules",
205205
*pr.Number,
206206
&github.IssueRequest{

.ci/magician/cmd/scheduled_pr_reminders_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ func TestFormatReminderComment(t *testing.T) {
882882
"@" + secondCoreReviewer,
883883
},
884884
notExpectedStrings: []string{
885-
"@GoogleCloudPlatform/terraform-team",
885+
"@trodge/terraform-team",
886886
"@pr-author",
887887
"@other-reviewer",
888888
},
@@ -899,7 +899,7 @@ func TestFormatReminderComment(t *testing.T) {
899899
state: waitingForReview,
900900
sinceDays: 5,
901901
expectedStrings: []string{
902-
"@GoogleCloudPlatform/terraform-team",
902+
"@trodge/terraform-team",
903903
"waiting for review for 1 week",
904904
"disable-review-reminders",
905905
"@" + firstCoreReviewer,
@@ -922,7 +922,7 @@ func TestFormatReminderComment(t *testing.T) {
922922
state: waitingForReview,
923923
sinceDays: 10,
924924
expectedStrings: []string{
925-
"@GoogleCloudPlatform/terraform-team",
925+
"@trodge/terraform-team",
926926
"waiting for review for 2 weeks",
927927
"disable-review-reminders",
928928
"@" + firstCoreReviewer,

.ci/magician/cmd/sync_branch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func execSyncBranchCmd(syncBranchPrefix, baseBranch, sha, githubToken string, ru
6363
return nil
6464
}
6565

66-
_, err := runner.Run("git", []string{"push", fmt.Sprintf("https://modular-magician:%[email protected]/GoogleCloudPlatform/magic-modules", githubToken), fmt.Sprintf("%s:%s", sha, syncBranch)}, nil)
66+
_, err := runner.Run("git", []string{"push", fmt.Sprintf("https://modular-magician:%[email protected]/trodge/magic-modules", githubToken), fmt.Sprintf("%s:%s", sha, syncBranch)}, nil)
6767
return err
6868
}
6969

.ci/magician/github/get.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type PullRequest struct {
3939
}
4040

4141
func (gh *Client) GetPullRequest(prNumber string) (PullRequest, error) {
42-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/issues/%s", prNumber)
42+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/issues/%s", prNumber)
4343

4444
var pullRequest PullRequest
4545

@@ -49,7 +49,7 @@ func (gh *Client) GetPullRequest(prNumber string) (PullRequest, error) {
4949
}
5050

5151
func (gh *Client) GetPullRequests(state, base, sort, direction string) ([]PullRequest, error) {
52-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/pulls?state=%s&base=%s&sort=%s&direction=%s", state, base, sort, direction)
52+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/pulls?state=%s&base=%s&sort=%s&direction=%s", state, base, sort, direction)
5353

5454
var pullRequests []PullRequest
5555

@@ -59,7 +59,7 @@ func (gh *Client) GetPullRequests(state, base, sort, direction string) ([]PullRe
5959
}
6060

6161
func (gh *Client) GetPullRequestRequestedReviewers(prNumber string) ([]User, error) {
62-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/pulls/%s/requested_reviewers", prNumber)
62+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/pulls/%s/requested_reviewers", prNumber)
6363

6464
var requestedReviewers struct {
6565
Users []User `json:"users"`
@@ -74,7 +74,7 @@ func (gh *Client) GetPullRequestRequestedReviewers(prNumber string) ([]User, err
7474
}
7575

7676
func (gh *Client) GetPullRequestPreviousReviewers(prNumber string) ([]User, error) {
77-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/pulls/%s/reviews", prNumber)
77+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/pulls/%s/reviews", prNumber)
7878

7979
var reviews []struct {
8080
User User `json:"user"`

.ci/magician/github/membership.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (gh *Client) GetUserType(user string) UserType {
162162
return CoreContributorUserType
163163
}
164164

165-
if isOrgMember(user, "GoogleCloudPlatform", gh.token) {
165+
if isOrgMember(user, "trodge", gh.token) {
166166
fmt.Println("User is a GCP org member")
167167
return GooglerUserType
168168
}

.ci/magician/github/set.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
)
2222

2323
func (gh *Client) PostBuildStatus(prNumber, title, state, targetURL, commitSha string) error {
24-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/%s", commitSha)
24+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/statuses/%s", commitSha)
2525

2626
postBody := map[string]string{
2727
"context": title,
@@ -40,7 +40,7 @@ func (gh *Client) PostBuildStatus(prNumber, title, state, targetURL, commitSha s
4040
}
4141

4242
func (gh *Client) PostComment(prNumber, comment string) error {
43-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/issues/%s/comments", prNumber)
43+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/issues/%s/comments", prNumber)
4444

4545
body := map[string]string{
4646
"body": comment,
@@ -57,7 +57,7 @@ func (gh *Client) PostComment(prNumber, comment string) error {
5757
}
5858

5959
func (gh *Client) RequestPullRequestReviewers(prNumber string, reviewers []string) error {
60-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/pulls/%s/requested_reviewers", prNumber)
60+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/pulls/%s/requested_reviewers", prNumber)
6161

6262
body := map[string][]string{
6363
"reviewers": reviewers,
@@ -75,7 +75,7 @@ func (gh *Client) RequestPullRequestReviewers(prNumber string, reviewers []strin
7575
}
7676

7777
func (gh *Client) AddLabels(prNumber string, labels []string) error {
78-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/issues/%s/labels", prNumber)
78+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/issues/%s/labels", prNumber)
7979

8080
body := map[string][]string{
8181
"labels": labels,
@@ -91,7 +91,7 @@ func (gh *Client) AddLabels(prNumber string, labels []string) error {
9191
}
9292

9393
func (gh *Client) RemoveLabel(prNumber, label string) error {
94-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/issues/%s/labels/%s", prNumber, label)
94+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/issues/%s/labels/%s", prNumber, label)
9595
err := utils.RequestCall(url, "DELETE", gh.token, nil, nil)
9696

9797
if err != nil {
@@ -102,7 +102,7 @@ func (gh *Client) RemoveLabel(prNumber, label string) error {
102102
}
103103

104104
func (gh *Client) CreateWorkflowDispatchEvent(workflowFileName string, inputs map[string]any) error {
105-
url := fmt.Sprintf("https://api.github.com/repos/GoogleCloudPlatform/magic-modules/actions/workflows/%s/dispatches", workflowFileName)
105+
url := fmt.Sprintf("https://api.github.com/repos/trodge/magic-modules/actions/workflows/%s/dispatches", workflowFileName)
106106
err := utils.RequestCall(url, "POST", gh.token, nil, map[string]any{
107107
"ref": "main",
108108
"inputs": inputs,

.ci/magician/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ module magician
22

33
go 1.21
44

5-
replace github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler => ../../tools/issue-labeler
5+
replace github.com/trodge/magic-modules/tools/issue-labeler => ../../tools/issue-labeler
66

77
require (
8-
github.com/GoogleCloudPlatform/magic-modules/tools/issue-labeler v0.0.0-00010101000000-000000000000
8+
github.com/trodge/magic-modules/tools/issue-labeler v0.0.0-00010101000000-000000000000
99
github.com/inconshreveable/mousetrap v1.1.0 // indirect
1010
github.com/spf13/cobra v1.7.0
1111
github.com/spf13/pflag v1.0.5 // indirect

0 commit comments

Comments
 (0)