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

put automated PRs in slow queue #753

Merged
merged 3 commits into from
May 7, 2024
Merged

put automated PRs in slow queue #753

merged 3 commits into from
May 7, 2024

Conversation

smonero
Copy link
Contributor

@smonero smonero commented May 6, 2024

It was said that we can use the slow task queue for automated PRs aka refactorator PRs.

@smonero
Copy link
Contributor Author

smonero commented May 6, 2024

The more I think about this, the more I wonder if instead of this approach we should have a third queue that is like in between normal and slow. Maybe semi-slow? I just wonder if we actually have to slow down as much as we are. Maybe a future action item.

@smonero smonero changed the title put automatetd PRs in slow queue put automated PRs in slow queue May 7, 2024
miguelmolina95
miguelmolina95 previously approved these changes May 7, 2024
@@ -55,6 +57,18 @@ func (a *Github) GithubListPRs(ctx context.Context, request ListPRsRequest) (Lis
}, nil
}

func IsPRAutomated(pr *github.PullRequest) bool {
if pr.Labels == nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://pkg.go.dev/github.com/google/go-github/v45/github#PullRequest

Labels              []*[Label](https://pkg.go.dev/github.com/google/go-github/v45/github#Label)              `json:"labels,omitempty"`

it's better to check zero length for a slice instead of nil, because there can be empty allocated slice.

@smonero smonero merged commit 3910895 into main May 7, 2024
3 checks passed
@smonero smonero deleted the slowQForAutomatedPrs branch May 7, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants