Skip to content

Commit 1af662d

Browse files
authored
Merge pull request #348 from shine2lay/fix-for-2.0
fix: push event + add fix docs for mergeable 2.0
2 parents 3a64440 + dc232d8 commit 1af662d

File tree

18 files changed

+25
-19
lines changed

18 files changed

+25
-19
lines changed

β€Ždocs/actions/check.rstβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ You can pass in Handlebars template to show the details result of the run.
6565
.. note::
6666
if any of required fields ``title``, ``summary`` or ``status`` is missing, default values will be used
6767

68-
.. warning::
69-
if you have have ``checks`` action only for some of the outcome, you may end up in a state where checks are never finished.
70-
So be sure to have ``checks`` for all outcome (``pass``, ``fail``, and ``error``)
68+
.. note::
69+
checks will automatically re-run if the base branch has a modified config file
7170

7271
Supported Events:
7372
::

β€Ždocs/configuration.rstβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Actions that mergeable is currently able to perform.
9292
actions/check.rst
9393
actions/close.rst
9494
actions/comment.rst
95+
actions/merge.rst
9596
actions/label.rst
9697
actions/request_review.rst
9798

β€Ždocs/validators/approval.rstβ€Ž

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,8 @@ Approvals
2121
owners: true # Optional boolean. When true, the file .github/CODEOWNER is read and only owners approval will count
2222

2323
.. note::
24-
``owners`` file now support option, make sure to use `@organization/team-slug` format.
24+
``owners`` file now support teams as well, make sure to use `@organization/team-slug` format.
2525

26-
.. warning::
27-
``owners`` sub-option only works in public repos right now, we have plans to enable it for private repos in the future.
28-
29-
.. warning::
30-
``teams`` (both through limit.teams and inside owners file) will not work right now, it require `team:read` permission which mergeable doesn't have, we have plans to request it in the near future.
3126

3227
Supported Events:
3328
::

β€Ždocs/validators/contents.rstβ€Ž

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ Contents
2020
match: 'A String' # or array of strings
2121
message: 'Come message...'
2222

23-
.. warning::
24-
``merge`` action will not work currently as it require ``contents`` ``read:write`` permission which the mergeable doesn't have. We have plans to enable it in the near future
25-
2623
Supported Events:
2724
::
2825

β€Žlib/actions/checks.jsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ class Checks extends Action {
7373
'pull_request.assigned',
7474
'pull_request.unassigned',
7575
'pull_request.unlabeled',
76-
'pull_request.synchronize'
76+
'pull_request.synchronize',
77+
'pull_request.push_synchronize'
7778
]
7879
this.checkRunResult = new Map()
7980
}

β€Žlib/interceptors/push.jsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class Push extends Interceptor {
3131
}))
3232

3333
const pulls = res.data
34-
3534
await Promise.all(pulls.map(pullRequest => {
3635
const newContext = _.cloneDeep(context)
3736
newContext.event = 'pull_request'

β€Žlib/validators/approvals.jsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ class Approvals extends Validator {
2525
'pull_request.assigned',
2626
'pull_request.unassigned',
2727
'pull_request.unlabeled',
28-
'pull_request.synchronize'
28+
'pull_request.synchronize',
29+
'pull_request.push_synchronize'
2930
]
3031

3132
this.supportedSettings = {

β€Žlib/validators/assignee.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Assignee extends Validator {
1616
'pull_request.unassigned',
1717
'pull_request.unlabeled',
1818
'pull_request.synchronize',
19+
'pull_request.push_synchronize',
1920
'issues.*'
2021
]
2122

β€Žlib/validators/changeset.jsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ class Changeset extends Validator {
1515
'pull_request.assigned',
1616
'pull_request.unassigned',
1717
'pull_request.unlabeled',
18-
'pull_request.synchronize'
18+
'pull_request.synchronize',
19+
'pull_request.push_synchronize'
1920
]
2021
this.supportedSettings = {
2122
no_empty: {

β€Žlib/validators/commit.jsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class Commit extends Validator {
2424
'pull_request.assigned',
2525
'pull_request.unassigned',
2626
'pull_request.unlabeled',
27-
'pull_request.synchronize'
27+
'pull_request.synchronize',
28+
'pull_request.push_synchronize'
2829
]
2930
this.supportedSettings = {
3031
message: {

0 commit comments

Comments
Β (0)