Skip to content

Commit

Permalink
Add defaultReviewers repo config
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-chisholm6 committed Dec 24, 2024
1 parent 2c5a21f commit 99b8913
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ type RepoConfig struct {
GitHubRemote string `default:"origin" yaml:"githubRemote"`
GitHubBranch string `default:"main" yaml:"githubBranch"`

RequireChecks bool `default:"true" yaml:"requireChecks"`
RequireApproval bool `default:"true" yaml:"requireApproval"`
RequireChecks bool `default:"true" yaml:"requireChecks"`
RequireApproval bool `default:"true" yaml:"requireApproval"`
DefaultReviewers []string `yaml:"defaultReviewers"`

MergeMethod string `default:"rebase" yaml:"mergeMethod"`
MergeQueue bool `default:"false" yaml:"mergeQueue"`
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ User specific configuration is saved to .spr.yml in the user home directory.
| branchNameIncludeTarget | bool | false | include target branch name in pull request branch name |
| showPrTitlesInStack | bool | false | show PR titles in stack description within pull request body |
| branchPushIndividually | bool | false | push branches individually instead of atomically (only enable to avoid timeouts) |

| defaultReviewers | list | | default reviewers to add to each pull request |

| User Config | Type | Default | Description |
| -------------------- | ---- | ------- | --------------------------------------------------------------- |
Expand Down
1 change: 1 addition & 0 deletions spr/spr.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func alignLocalCommits(commits []git.Commit, prs []*github.PullRequest) []git.Co
// will also be reordered to match the commit stack order.
func (sd *stackediff) UpdatePullRequests(ctx context.Context, reviewers []string, count *uint) {
sd.profiletimer.Step("UpdatePullRequests::Start")
reviewers = append(sd.config.Repo.DefaultReviewers, reviewers...)
githubInfo := sd.fetchAndGetGitHubInfo(ctx)
if githubInfo == nil {
return
Expand Down

0 comments on commit 99b8913

Please sign in to comment.