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

fix: Extend checks supported events #700

Merged
merged 2 commits into from
Mar 7, 2023
Merged
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: 4 additions & 1 deletion docs/actions/check.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ You can pass in Handlebars template to show the details result of the run.
checks will automatically re-run if the base branch has a modified config file

Supported Events:

The `pull_request.closed` event is not supported since it does not have meaningful use in the context of GitHub check API.

::

'pull_request.*', 'pull_request_review.*'
'pull_request.assigned', 'pull_request.auto_merge_disabled', 'pull_request.auto_merge_enabled', 'pull_request.converted_to_draft', 'pull_request.demilestoned', 'pull_request.dequeued', 'pull_request.edited', 'pull_request.enqueued', 'pull_request.labeled', 'pull_request.locked', 'pull_request.milestoned', 'pull_request.opened', 'pull_request.push_synchronize', 'pull_request.ready_for_review', 'pull_request.reopened', 'pull_request.review_request_removed', 'pull_request.review_requested', 'pull_request.synchronize', 'pull_request.unassigned', 'pull_request.unlabeled', 'pull_request.unlocked', 'pull_request_review.dismissed', 'pull_request_review.edited', 'pull_request_review.submitted'
3 changes: 2 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CHANGELOG
=====================================
| March 7, 2023: fix: Extend checks supported events `#700 <https://github.com/mergeability/mergeable/pull/700>`_
| March 1, 2023: feat:Added user information for commit validator `#682 <https://github.com/mergeability/mergeable/pull/682>`_
| February 03, 2023: feat: Add team option to author filter `#696 <https://github.com/mergeability/mergeable/pull/696>`_
| February 3, 2023: feat: Add team option to author filter `#696 <https://github.com/mergeability/mergeable/pull/696>`_
| February 3, 2023: chore: Update node version for release workflow `#699 <https://github.com/mergeability/mergeable/pull/699>`_
| February 3, 2023: feat: Add Not operator `#695 <https://github.com/mergeability/mergeable/pull/695>`_
| September 28, 2022: feat: Add last comment validator `#668 <https://github.com/mergeability/mergeable/pull/668>`_
Expand Down
32 changes: 24 additions & 8 deletions lib/actions/checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,36 @@ const updateParams = ({ context, id, name, status, output, conclusion }) => {
class Checks extends Action {
constructor () {
super('checks')

// Support for 'pull_request.closed' event was not enabled since
// it does not have meaningful use in the context of GitHub
// check API: there is no reason to post a check result on a
// pull request that is actually closed.
this.supportedEvents = [
'pull_request.opened',
'pull_request.assigned',
'pull_request.auto_merge_disabled',
'pull_request.auto_merge_enabled',
'pull_request.converted_to_draft',
'pull_request.demilestoned',
'pull_request.dequeued',
'pull_request.edited',
'pull_request_review.submitted',
'pull_request_review.edited',
'pull_request_review.dismissed',
'pull_request.enqueued',
'pull_request.labeled',
'pull_request.locked',
'pull_request.milestoned',
'pull_request.demilestoned',
'pull_request.assigned',
'pull_request.opened',
'pull_request.push_synchronize',
'pull_request.ready_for_review',
'pull_request.reopened',
'pull_request.review_request_removed',
'pull_request.review_requested',
'pull_request.synchronize',
'pull_request.unassigned',
'pull_request.unlabeled',
'pull_request.synchronize',
'pull_request.push_synchronize'
'pull_request.unlocked',
'pull_request_review.dismissed',
'pull_request_review.edited',
'pull_request_review.submitted'
]
this.checkRunResult = new Map()
}
Expand Down