|
| 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.Int |
| 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 Issue From File |
| 25 | + * |
| 26 | + * An action to create an issue using content from a file |
| 27 | + * |
| 28 | + * [Action on GitHub](https://github.com/peter-evans/create-issue-from-file) |
| 29 | + * |
| 30 | + * @param token The GitHub authentication token |
| 31 | + * @param repository The target GitHub repository |
| 32 | + * @param issueNumber The issue number of an existing issue to update |
| 33 | + * @param title The title of the issue |
| 34 | + * @param contentFilepath The file path to the issue content |
| 35 | + * @param labels A comma or newline-separated list of labels |
| 36 | + * @param assignees A comma or newline-separated list of assignees (GitHub usernames) |
| 37 | + * @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by |
| 38 | + * the binding |
| 39 | + * @param _customVersion Allows overriding action's version, for example to use a specific minor |
| 40 | + * version, or a newer version that the binding doesn't yet know about |
| 41 | + */ |
| 42 | +public data class CreateIssueFromFileV5 private constructor( |
| 43 | + /** |
| 44 | + * The GitHub authentication token |
| 45 | + */ |
| 46 | + public val token: String? = null, |
| 47 | + /** |
| 48 | + * The target GitHub repository |
| 49 | + */ |
| 50 | + public val repository: String? = null, |
| 51 | + /** |
| 52 | + * The issue number of an existing issue to update |
| 53 | + */ |
| 54 | + public val issueNumber: Int? = null, |
| 55 | + /** |
| 56 | + * The title of the issue |
| 57 | + */ |
| 58 | + public val title: String, |
| 59 | + /** |
| 60 | + * The file path to the issue content |
| 61 | + */ |
| 62 | + public val contentFilepath: String? = null, |
| 63 | + /** |
| 64 | + * A comma or newline-separated list of labels |
| 65 | + */ |
| 66 | + public val labels: List<String>? = null, |
| 67 | + /** |
| 68 | + * A comma or newline-separated list of assignees (GitHub usernames) |
| 69 | + */ |
| 70 | + public val assignees: List<String>? = null, |
| 71 | + /** |
| 72 | + * Type-unsafe map where you can put any inputs that are not yet supported by the binding |
| 73 | + */ |
| 74 | + public val _customInputs: Map<String, String> = mapOf(), |
| 75 | + /** |
| 76 | + * Allows overriding action's version, for example to use a specific minor version, or a newer |
| 77 | + * version that the binding doesn't yet know about |
| 78 | + */ |
| 79 | + public val _customVersion: String? = null, |
| 80 | +) : RegularAction<CreateIssueFromFileV5.Outputs>("peter-evans", "create-issue-from-file", |
| 81 | + _customVersion ?: "v5") { |
| 82 | + public constructor( |
| 83 | + vararg pleaseUseNamedArguments: Unit, |
| 84 | + token: String? = null, |
| 85 | + repository: String? = null, |
| 86 | + issueNumber: Int? = null, |
| 87 | + title: String, |
| 88 | + contentFilepath: String? = null, |
| 89 | + labels: List<String>? = null, |
| 90 | + assignees: List<String>? = null, |
| 91 | + _customInputs: Map<String, String> = mapOf(), |
| 92 | + _customVersion: String? = null, |
| 93 | + ) : this(token=token, repository=repository, issueNumber=issueNumber, title=title, |
| 94 | + contentFilepath=contentFilepath, labels=labels, assignees=assignees, |
| 95 | + _customInputs=_customInputs, _customVersion=_customVersion) |
| 96 | + |
| 97 | + @Suppress("SpreadOperator") |
| 98 | + override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( |
| 99 | + *listOfNotNull( |
| 100 | + token?.let { "token" to it }, |
| 101 | + repository?.let { "repository" to it }, |
| 102 | + issueNumber?.let { "issue-number" to it.toString() }, |
| 103 | + "title" to title, |
| 104 | + contentFilepath?.let { "content-filepath" to it }, |
| 105 | + labels?.let { "labels" to it.joinToString(",") }, |
| 106 | + assignees?.let { "assignees" to it.joinToString(",") }, |
| 107 | + *_customInputs.toList().toTypedArray(), |
| 108 | + ).toTypedArray() |
| 109 | + ) |
| 110 | + |
| 111 | + override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId) |
| 112 | + |
| 113 | + public class Outputs( |
| 114 | + stepId: String, |
| 115 | + ) : Action.Outputs(stepId) { |
| 116 | + /** |
| 117 | + * The number of the created issue |
| 118 | + */ |
| 119 | + public val issueNumber: String = "steps.$stepId.outputs.issue-number" |
| 120 | + } |
| 121 | +} |
0 commit comments