Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add defaultReviewers repo config #433

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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