Skip to content

Commit 0af8d8e

Browse files
committed
Revert "Add mergeable for PRs"
This reverts commit 2c48333. Something is borked, nothing is saved anylonger.
1 parent 2c48333 commit 0af8d8e

File tree

8 files changed

+5
-27
lines changed

8 files changed

+5
-27
lines changed

internal/github/github.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ type prSearchResultGraphQl struct {
4040
}
4141
}
4242
ReviewDecision string
43-
Mergeable bool
4443
UpdatedAt string
4544
Author struct {
4645
Login string
@@ -265,7 +264,6 @@ func QueryGithub(token string, username string, logger *slog.Logger) ([]types.Vi
265264
RepoOwner: pr.Repository.Owner.Login,
266265
RepoUrl: pr.Repository.Url,
267266
IsDraft: pr.IsDraft,
268-
Mergeable: pr.Mergeable,
269267
LastUpdated: updatedAt,
270268
LastPrCommenter: lastPrCommenter,
271269
ThreadsActionable: threadsActionable,
@@ -364,7 +362,6 @@ func querySearchPrsInvolvingUser(username string) string {
364362
}
365363
}
366364
reviewDecision
367-
mergeable
368365
updatedAt
369366
author {
370367
login

internal/points/points.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ func StandardPrPoints(pr types.ViewPr, username string) *Points {
5757
// at it
5858
points.Add(10, "You should add reviewers")
5959
}
60-
61-
if !pr.Mergeable {
62-
points.Add(150, "Some checks failed (failed build/test, merge conflicts, github actions, etc.)")
63-
}
6460
} else {
6561
// someone else's pr, or our but the username is not set
6662
if pr.ReviewStatus == "APPROVED" {
@@ -96,10 +92,6 @@ func StandardPrPoints(pr types.ViewPr, username string) *Points {
9692
case diff > 300:
9793
points.Add(10, fmt.Sprintf("PR is bigish, %d loc changed is >300", diff))
9894
}
99-
100-
if !pr.Mergeable {
101-
points.Remove(150, "Some checks failed (failed build/test, merge conflicts, github actions, etc.)")
102-
}
10395
}
10496

10597
if pr.ThreadsActionable > 0 {

internal/storage/models.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/storage/query.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ insert into prs (
1111
repo_owner,
1212
repo_url,
1313
is_draft,
14-
mergeable,
1514
last_updated,
1615
last_pr_commenter,
1716
threads_actionable,
@@ -21,7 +20,7 @@ insert into prs (
2120
review_requested_from_users,
2221
buried
2322
) values (
24-
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
23+
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
2524
) returning *;
2625

2726
-- name: DeletePrs :exec

internal/storage/query.sql.go

Lines changed: 4 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/storage/schema.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ create table if not exists prs (
77
repo_owner text not null,
88
repo_url text not null,
99
is_draft boolean not null,
10-
mergeable boolean not null,
1110
last_updated text not null,
1211
last_pr_commenter text not null,
1312
threads_actionable integer not null,

internal/storage/storage.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ func (s *Storage) StoreRepoPrs(orderedPrs []types.ViewPr) error {
117117
RepoName: pr.RepoName,
118118
RepoOwner: pr.RepoOwner,
119119
RepoUrl: pr.RepoUrl,
120-
Mergeable: pr.Mergeable,
121120
IsDraft: pr.IsDraft,
122121
LastUpdated: pr.LastUpdated.Format(time.RFC3339),
123122
LastPrCommenter: pr.LastPrCommenter,

internal/types/types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ type ViewPr struct {
1717
RepoOwner string
1818
RepoUrl string
1919
IsDraft bool
20-
Mergeable bool
2120
LastUpdated time.Time
2221
LastPrCommenter string
2322
ThreadsActionable int

0 commit comments

Comments
 (0)