Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 6b659eb

Browse files
committed
Mimic git merge-base
Github doesn't provide a merge-base thing, so previously the code used "master" to compare against, which can easily fail. Find a better commit to compare config contents against (config/owner checks) using the list of commits in the PR. Note that an alternative would be to use GH's `potentialMergeCommit` (compare "master" as the old, and this as the new). It takes a while for it to be generated, but we already wait until `mergeable` is not "UNKNOWN" which might mean that this is ready too. But even with that, it seems like a bad idea to rely on information from these temporary merge branches.
1 parent ff044e7 commit 6b659eb

File tree

163 files changed

+250
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+250
-14
lines changed

src/_tests/fixtures/38979/_response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"state": "OPEN",
3939
"headRefOid": "222334139e52fc16369464cfb5dc95c82f71192f",
4040
"changedFiles": 72,
41+
"commitIds": {},
4142
"timelineItems": {
4243
"nodes": [
4344
{

src/_tests/fixtures/38979/derived.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"pr_number": 38979,
55
"author": "ExE-Boss",
66
"headCommitOid": "222334139e52fc16369464cfb5dc95c82f71192f",
7+
"mergeBaseOid": "master",
78
"lastPushDate": "2020-01-03T21:02:41.000Z",
89
"lastActivityDate": "2020-05-12T15:13:19.000Z",
910
"hasMergeConflict": false,

src/_tests/fixtures/43136/_response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"state": "OPEN",
3838
"headRefOid": "e6863537248bbfee8f0ef8c636bb00c25cf40b96",
3939
"changedFiles": 2,
40+
"commitIds": {},
4041
"timelineItems": {
4142
"nodes": [
4243
{

src/_tests/fixtures/43136/derived.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"pr_number": 43136,
55
"author": "larsrh",
66
"headCommitOid": "e6863537248bbfee8f0ef8c636bb00c25cf40b96",
7+
"mergeBaseOid": "master",
78
"lastPushDate": "2020-03-16T14:26:42.000Z",
89
"lastActivityDate": "2020-03-16T14:31:40.000Z",
910
"hasMergeConflict": false,

src/_tests/fixtures/43144/_response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"state": "OPEN",
3434
"headRefOid": "f1f5c4bb0ae553f56766882f6458d2e22baa87c7",
3535
"changedFiles": 2,
36+
"commitIds": {},
3637
"timelineItems": {
3738
"nodes": [
3839
{

src/_tests/fixtures/43144/derived.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"pr_number": 43144,
55
"author": "jeffreymeng",
66
"headCommitOid": "f1f5c4bb0ae553f56766882f6458d2e22baa87c7",
7+
"mergeBaseOid": "master",
78
"lastPushDate": "2020-03-15T00:11:48.000Z",
89
"lastActivityDate": "2020-03-15T01:29:09.000Z",
910
"hasMergeConflict": false,

src/_tests/fixtures/43151/_response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"state": "OPEN",
3838
"headRefOid": "bb6d3150b485cd203d265e06ca910262256e523e",
3939
"changedFiles": 4,
40+
"commitIds": {},
4041
"timelineItems": {
4142
"nodes": [
4243
{

src/_tests/fixtures/43151/derived.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"pr_number": 43151,
55
"author": "adamzerella",
66
"headCommitOid": "bb6d3150b485cd203d265e06ca910262256e523e",
7+
"mergeBaseOid": "master",
78
"lastPushDate": "2020-03-15T12:50:20.000Z",
89
"lastActivityDate": "2020-03-15T18:11:57.000Z",
910
"hasMergeConflict": false,

src/_tests/fixtures/43160/_response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"state": "OPEN",
3838
"headRefOid": "6d5d2a85b41d287f97c9d331a9ff6a9824e2f1ff",
3939
"changedFiles": 1,
40+
"commitIds": {},
4041
"timelineItems": {
4142
"nodes": [
4243
{

src/_tests/fixtures/43160/derived.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"pr_number": 43160,
55
"author": "rikkertkoppes",
66
"headCommitOid": "6d5d2a85b41d287f97c9d331a9ff6a9824e2f1ff",
7+
"mergeBaseOid": "master",
78
"lastPushDate": "2020-03-16T08:14:50.000Z",
89
"lastActivityDate": "2020-03-17T14:33:47.000Z",
910
"hasMergeConflict": false,

0 commit comments

Comments
 (0)