The action works perfectly but I would have a question on the required_status_checks property: Would you have an example on how to fill this field ? My required status check is called "Validate PR" and tried to add it in the Branch protection ON action as you can see below, but without any luck.
- name: Branch protection ON
uses: octokit/request-action@v2.x
with:
route: PUT /repos/:repository/branches/develop/protection
repository: ${{ github.repository }}
required_status_checks: |
Validate PR
also
required_status_checks: |
'Validate PR'
Pipeline logs:
Run octokit/request-action@v2.x
with:
route: PUT /repos/:repository/branches/develop/protection
repository: MCBC-Org/beermate-salesforce
required_status_checks: Validate PR
No subschema in "anyOf" matched.
For 'allOf/0', "Validate PR" is not an object.
Not all subschemas of "allOf" matched.
For 'anyOf/1', "Validate PR" is not a null.
SDK Version
No response
API Version
2.x
Relevant log output
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
I will close the issue as I managed to resolve my challenge using:
required_status_checks: |
strict: false
checks: [
{
"context": "Validate Job",
"app_id": null
}
]
Describe the need
Hi team,
First of all, thank you for the efforts invested in creating this great action.
I am currently using the octokit/request-action@v2.x action to turn off & on the branch protection. See the example below:
The action works perfectly but I would have a question on the required_status_checks property: Would you have an example on how to fill this field ? My required status check is called "Validate PR" and tried to add it in the Branch protection ON action as you can see below, but without any luck.
also
Pipeline logs:
Run octokit/request-action@v2.x with: route: PUT /repos/:repository/branches/develop/protection repository: MCBC-Org/beermate-salesforce required_status_checks: Validate PR
required_approving_review_count: 2
env: GITHUB_TOKEN: *** PUT /repos/:repository/branches/develop/protection
No subschema in "anyOf" matched. For 'allOf/0', "Validate PR" is not an object. Not all subschemas of "allOf" matched. For 'anyOf/1', "Validate PR" is not a null.
SDK Version
No response
API Version
2.x
Relevant log output
No response
Code of Conduct