|
| 1 | +// This file was generated using action-binding-generator. Don't change it by hand, otherwise your |
| 2 | +// changes will be overwritten with the next binding code regeneration. |
| 3 | +// See https://github.com/typesafegithub/github-workflows-kt for more info. |
| 4 | +@file:Suppress( |
| 5 | + "DataClassPrivateConstructor", |
| 6 | + "UNUSED_PARAMETER", |
| 7 | +) |
| 8 | + |
| 9 | +package io.github.typesafegithub.workflows.actions.peterevans |
| 10 | + |
| 11 | +import io.github.typesafegithub.workflows.domain.actions.Action |
| 12 | +import io.github.typesafegithub.workflows.domain.actions.RegularAction |
| 13 | +import java.util.LinkedHashMap |
| 14 | +import kotlin.Boolean |
| 15 | +import kotlin.String |
| 16 | +import kotlin.Suppress |
| 17 | +import kotlin.Unit |
| 18 | +import kotlin.collections.List |
| 19 | +import kotlin.collections.Map |
| 20 | +import kotlin.collections.toList |
| 21 | +import kotlin.collections.toTypedArray |
| 22 | + |
| 23 | +/** |
| 24 | + * Action: Create Pull Request |
| 25 | + * |
| 26 | + * Creates a pull request for changes to your repository in the actions workspace |
| 27 | + * |
| 28 | + * [Action on GitHub](https://github.com/peter-evans/create-pull-request) |
| 29 | + * |
| 30 | + * @param token GITHUB_TOKEN or a `repo` scoped Personal Access Token (PAT) |
| 31 | + * @param gitToken The Personal Access Token (PAT) that the action will use for git operations. |
| 32 | + * Defaults to the value of `token`. |
| 33 | + * @param path Relative path under $GITHUB_WORKSPACE to the repository. Defaults to |
| 34 | + * $GITHUB_WORKSPACE. |
| 35 | + * @param addPaths A comma or newline-separated list of file paths to commit. Paths should follow |
| 36 | + * git's pathspec syntax. Defaults to adding all new and modified files. |
| 37 | + * @param commitMessage The message to use when committing changes. |
| 38 | + * @param committer The committer name and email address in the format `Display Name |
| 39 | + * <[email protected]>`. Defaults to the GitHub Actions bot user. |
| 40 | + * @param author The author name and email address in the format `Display Name <[email protected]>`. |
| 41 | + * Defaults to the user who triggered the workflow run. |
| 42 | + * @param signoff Add `Signed-off-by` line by the committer at the end of the commit log message. |
| 43 | + * @param branch The pull request branch name. |
| 44 | + * @param deleteBranch Delete the `branch` if it doesn't have an active pull request associated with |
| 45 | + * it. |
| 46 | + * @param branchSuffix The branch suffix type when using the alternative branching strategy. |
| 47 | + * @param base The pull request base branch. Defaults to the branch checked out in the workflow. |
| 48 | + * @param pushToFork A fork of the checked out parent repository to which the pull request branch |
| 49 | + * will be pushed. e.g. `owner/repo-fork`. The pull request will be created to merge the fork's branch |
| 50 | + * into the parent's base. |
| 51 | + * @param title The title of the pull request. |
| 52 | + * @param body The body of the pull request. |
| 53 | + * @param bodyPath The path to a file containing the pull request body. Takes precedence over |
| 54 | + * `body`. |
| 55 | + * @param labels A comma or newline separated list of labels. |
| 56 | + * @param assignees A comma or newline separated list of assignees (GitHub usernames). |
| 57 | + * @param reviewers A comma or newline separated list of reviewers (GitHub usernames) to request a |
| 58 | + * review from. |
| 59 | + * @param teamReviewers A comma or newline separated list of GitHub teams to request a review from. |
| 60 | + * Note that a `repo` scoped Personal Access Token (PAT) may be required. |
| 61 | + * @param milestone The number of the milestone to associate the pull request with. |
| 62 | + * @param draft Create a draft pull request. It is not possible to change draft status after |
| 63 | + * creation except through the web interface |
| 64 | + * @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by |
| 65 | + * the binding |
| 66 | + * @param _customVersion Allows overriding action's version, for example to use a specific minor |
| 67 | + * version, or a newer version that the binding doesn't yet know about |
| 68 | + */ |
| 69 | +public data class CreatePullRequestV6 private constructor( |
| 70 | + /** |
| 71 | + * GITHUB_TOKEN or a `repo` scoped Personal Access Token (PAT) |
| 72 | + */ |
| 73 | + public val token: String? = null, |
| 74 | + /** |
| 75 | + * The Personal Access Token (PAT) that the action will use for git operations. Defaults to the |
| 76 | + * value of `token`. |
| 77 | + */ |
| 78 | + public val gitToken: String? = null, |
| 79 | + /** |
| 80 | + * Relative path under $GITHUB_WORKSPACE to the repository. Defaults to $GITHUB_WORKSPACE. |
| 81 | + */ |
| 82 | + public val path: String? = null, |
| 83 | + /** |
| 84 | + * A comma or newline-separated list of file paths to commit. Paths should follow git's pathspec |
| 85 | + * syntax. Defaults to adding all new and modified files. |
| 86 | + */ |
| 87 | + public val addPaths: List<String>? = null, |
| 88 | + /** |
| 89 | + * The message to use when committing changes. |
| 90 | + */ |
| 91 | + public val commitMessage: String? = null, |
| 92 | + /** |
| 93 | + * The committer name and email address in the format `Display Name <[email protected]>`. |
| 94 | + * Defaults to the GitHub Actions bot user. |
| 95 | + */ |
| 96 | + public val committer: String? = null, |
| 97 | + /** |
| 98 | + * The author name and email address in the format `Display Name <[email protected]>`. Defaults |
| 99 | + * to the user who triggered the workflow run. |
| 100 | + */ |
| 101 | + public val author: String? = null, |
| 102 | + /** |
| 103 | + * Add `Signed-off-by` line by the committer at the end of the commit log message. |
| 104 | + */ |
| 105 | + public val signoff: Boolean? = null, |
| 106 | + /** |
| 107 | + * The pull request branch name. |
| 108 | + */ |
| 109 | + public val branch: String? = null, |
| 110 | + /** |
| 111 | + * Delete the `branch` if it doesn't have an active pull request associated with it. |
| 112 | + */ |
| 113 | + public val deleteBranch: Boolean? = null, |
| 114 | + /** |
| 115 | + * The branch suffix type when using the alternative branching strategy. |
| 116 | + */ |
| 117 | + public val branchSuffix: String? = null, |
| 118 | + /** |
| 119 | + * The pull request base branch. Defaults to the branch checked out in the workflow. |
| 120 | + */ |
| 121 | + public val base: String? = null, |
| 122 | + /** |
| 123 | + * A fork of the checked out parent repository to which the pull request branch will be pushed. |
| 124 | + * e.g. `owner/repo-fork`. The pull request will be created to merge the fork's branch into the |
| 125 | + * parent's base. |
| 126 | + */ |
| 127 | + public val pushToFork: String? = null, |
| 128 | + /** |
| 129 | + * The title of the pull request. |
| 130 | + */ |
| 131 | + public val title: String? = null, |
| 132 | + /** |
| 133 | + * The body of the pull request. |
| 134 | + */ |
| 135 | + public val body: String? = null, |
| 136 | + /** |
| 137 | + * The path to a file containing the pull request body. Takes precedence over `body`. |
| 138 | + */ |
| 139 | + public val bodyPath: String? = null, |
| 140 | + /** |
| 141 | + * A comma or newline separated list of labels. |
| 142 | + */ |
| 143 | + public val labels: List<String>? = null, |
| 144 | + /** |
| 145 | + * A comma or newline separated list of assignees (GitHub usernames). |
| 146 | + */ |
| 147 | + public val assignees: List<String>? = null, |
| 148 | + /** |
| 149 | + * A comma or newline separated list of reviewers (GitHub usernames) to request a review from. |
| 150 | + */ |
| 151 | + public val reviewers: List<String>? = null, |
| 152 | + /** |
| 153 | + * A comma or newline separated list of GitHub teams to request a review from. Note that a |
| 154 | + * `repo` scoped Personal Access Token (PAT) may be required. |
| 155 | + */ |
| 156 | + public val teamReviewers: List<String>? = null, |
| 157 | + /** |
| 158 | + * The number of the milestone to associate the pull request with. |
| 159 | + */ |
| 160 | + public val milestone: String? = null, |
| 161 | + /** |
| 162 | + * Create a draft pull request. It is not possible to change draft status after creation except |
| 163 | + * through the web interface |
| 164 | + */ |
| 165 | + public val draft: Boolean? = null, |
| 166 | + /** |
| 167 | + * Type-unsafe map where you can put any inputs that are not yet supported by the binding |
| 168 | + */ |
| 169 | + public val _customInputs: Map<String, String> = mapOf(), |
| 170 | + /** |
| 171 | + * Allows overriding action's version, for example to use a specific minor version, or a newer |
| 172 | + * version that the binding doesn't yet know about |
| 173 | + */ |
| 174 | + public val _customVersion: String? = null, |
| 175 | +) : RegularAction<CreatePullRequestV6.Outputs>("peter-evans", "create-pull-request", _customVersion |
| 176 | + ?: "v6") { |
| 177 | + public constructor( |
| 178 | + vararg pleaseUseNamedArguments: Unit, |
| 179 | + token: String? = null, |
| 180 | + gitToken: String? = null, |
| 181 | + path: String? = null, |
| 182 | + addPaths: List<String>? = null, |
| 183 | + commitMessage: String? = null, |
| 184 | + committer: String? = null, |
| 185 | + author: String? = null, |
| 186 | + signoff: Boolean? = null, |
| 187 | + branch: String? = null, |
| 188 | + deleteBranch: Boolean? = null, |
| 189 | + branchSuffix: String? = null, |
| 190 | + base: String? = null, |
| 191 | + pushToFork: String? = null, |
| 192 | + title: String? = null, |
| 193 | + body: String? = null, |
| 194 | + bodyPath: String? = null, |
| 195 | + labels: List<String>? = null, |
| 196 | + assignees: List<String>? = null, |
| 197 | + reviewers: List<String>? = null, |
| 198 | + teamReviewers: List<String>? = null, |
| 199 | + milestone: String? = null, |
| 200 | + draft: Boolean? = null, |
| 201 | + _customInputs: Map<String, String> = mapOf(), |
| 202 | + _customVersion: String? = null, |
| 203 | + ) : this(token=token, gitToken=gitToken, path=path, addPaths=addPaths, |
| 204 | + commitMessage=commitMessage, committer=committer, author=author, signoff=signoff, |
| 205 | + branch=branch, deleteBranch=deleteBranch, branchSuffix=branchSuffix, base=base, |
| 206 | + pushToFork=pushToFork, title=title, body=body, bodyPath=bodyPath, labels=labels, |
| 207 | + assignees=assignees, reviewers=reviewers, teamReviewers=teamReviewers, |
| 208 | + milestone=milestone, draft=draft, _customInputs=_customInputs, |
| 209 | + _customVersion=_customVersion) |
| 210 | + |
| 211 | + @Suppress("SpreadOperator") |
| 212 | + override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( |
| 213 | + *listOfNotNull( |
| 214 | + token?.let { "token" to it }, |
| 215 | + gitToken?.let { "git-token" to it }, |
| 216 | + path?.let { "path" to it }, |
| 217 | + addPaths?.let { "add-paths" to it.joinToString("\n") }, |
| 218 | + commitMessage?.let { "commit-message" to it }, |
| 219 | + committer?.let { "committer" to it }, |
| 220 | + author?.let { "author" to it }, |
| 221 | + signoff?.let { "signoff" to it.toString() }, |
| 222 | + branch?.let { "branch" to it }, |
| 223 | + deleteBranch?.let { "delete-branch" to it.toString() }, |
| 224 | + branchSuffix?.let { "branch-suffix" to it }, |
| 225 | + base?.let { "base" to it }, |
| 226 | + pushToFork?.let { "push-to-fork" to it }, |
| 227 | + title?.let { "title" to it }, |
| 228 | + body?.let { "body" to it }, |
| 229 | + bodyPath?.let { "body-path" to it }, |
| 230 | + labels?.let { "labels" to it.joinToString("\n") }, |
| 231 | + assignees?.let { "assignees" to it.joinToString("\n") }, |
| 232 | + reviewers?.let { "reviewers" to it.joinToString("\n") }, |
| 233 | + teamReviewers?.let { "team-reviewers" to it.joinToString("\n") }, |
| 234 | + milestone?.let { "milestone" to it }, |
| 235 | + draft?.let { "draft" to it.toString() }, |
| 236 | + *_customInputs.toList().toTypedArray(), |
| 237 | + ).toTypedArray() |
| 238 | + ) |
| 239 | + |
| 240 | + override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId) |
| 241 | + |
| 242 | + public class Outputs( |
| 243 | + stepId: String, |
| 244 | + ) : Action.Outputs(stepId) { |
| 245 | + /** |
| 246 | + * The pull request number |
| 247 | + */ |
| 248 | + public val pullRequestNumber: String = "steps.$stepId.outputs.pull-request-number" |
| 249 | + |
| 250 | + /** |
| 251 | + * The URL of the pull request. |
| 252 | + */ |
| 253 | + public val pullRequestUrl: String = "steps.$stepId.outputs.pull-request-url" |
| 254 | + |
| 255 | + /** |
| 256 | + * The pull request operation performed by the action, `created`, `updated` or `closed`. |
| 257 | + */ |
| 258 | + public val pullRequestOperation: String = "steps.$stepId.outputs.pull-request-operation" |
| 259 | + |
| 260 | + /** |
| 261 | + * The commit SHA of the pull request branch. |
| 262 | + */ |
| 263 | + public val pullRequestHeadSha: String = "steps.$stepId.outputs.pull-request-head-sha" |
| 264 | + } |
| 265 | +} |
0 commit comments