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

Enhancement: Add support for checks key in required_status_checks #547

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ branches:
required_status_checks:
# Required. Require branches to be up to date before merging.
strict: true
# Required. The list of status checks to require in order to merge into this branch
# Required. Deprecated. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use checks instead of contexts for more fine-grained control.
contexts: []
Comment on lines +147 to 148

Choose a reason for hiding this comment

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

Suggested change
# Required. Deprecated. The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use checks instead of contexts for more fine-grained control.
contexts: []

I'd just remove this entirely. It works, I tested. 😊

# The list of status checks to require in order to merge into this branch
checks: []
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
enforce_admins: true
# Prevent merge commits from being pushed to matching branches
Expand Down
7 changes: 6 additions & 1 deletion test/unit/lib/mergeArrayByName.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe('mergeArrayByName', () => {
required_status_checks:
strict: true
contexts: []
checks: []
enforce_admins: false
restrictions:
`)
Expand All @@ -67,7 +68,11 @@ describe('mergeArrayByName', () => {
require_code_owner_reviews: true,
dismissal_restrictions: {}
},
required_status_checks: { strict: true, contexts: [] },
required_status_checks: {
strict: true,
contexts: [],
checks: []
},
enforce_admins: false,
restrictions: null
}
Expand Down