Add support for auto_merge and required_contexts
#152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR extends the action to provide more configuration options when creating a deploy, by providing input support for
auto_mergeandrequired_contexts. More details can be found in the GitHub API docs: https://docs.github.com/en/rest/deployments/deployments?apiVersion=2022-11-28#create-a-deploymentauto_mergeis fairly straightforward. It is currently defaulting tofalse, and we can preserve that in this change for backwards compatibility.required_contexts, on the other hand, has three states:["test", "lint"], which is a specific list of contexts to run[], which ignores all the contextsundefined, which means, "run the default list of contexts"Currently,
required_contextsis set to[]. In order to preserve backwards compatibility, users will have to pass an explicit"null"string for this input (supporting case 3). Omitting this input will skip all the required checks (case 2, the current case). Providing a multiline string covers case 1: