-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(actions): add peter-evans/create-issue-from-file@v5
- Loading branch information
Showing
5 changed files
with
130 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
24452a72d85239eacf1468b0f1982a9f3fec4c94 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
...gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV5.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your | ||
// changes will be overwritten with the next binding code regeneration. | ||
// See https://github.com/typesafegithub/github-workflows-kt for more info. | ||
@file:Suppress( | ||
"DataClassPrivateConstructor", | ||
"UNUSED_PARAMETER", | ||
) | ||
|
||
package io.github.typesafegithub.workflows.actions.peterevans | ||
|
||
import io.github.typesafegithub.workflows.domain.actions.Action | ||
import io.github.typesafegithub.workflows.domain.actions.RegularAction | ||
import java.util.LinkedHashMap | ||
import kotlin.Int | ||
import kotlin.String | ||
import kotlin.Suppress | ||
import kotlin.Unit | ||
import kotlin.collections.List | ||
import kotlin.collections.Map | ||
import kotlin.collections.toList | ||
import kotlin.collections.toTypedArray | ||
|
||
/** | ||
* Action: Create Issue From File | ||
* | ||
* An action to create an issue using content from a file | ||
* | ||
* [Action on GitHub](https://github.com/peter-evans/create-issue-from-file) | ||
* | ||
* @param token The GitHub authentication token | ||
* @param repository The target GitHub repository | ||
* @param issueNumber The issue number of an existing issue to update | ||
* @param title The title of the issue | ||
* @param contentFilepath The file path to the issue content | ||
* @param labels A comma or newline-separated list of labels | ||
* @param assignees A comma or newline-separated list of assignees (GitHub usernames) | ||
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by | ||
* the binding | ||
* @param _customVersion Allows overriding action's version, for example to use a specific minor | ||
* version, or a newer version that the binding doesn't yet know about | ||
*/ | ||
public data class CreateIssueFromFileV5 private constructor( | ||
/** | ||
* The GitHub authentication token | ||
*/ | ||
public val token: String? = null, | ||
/** | ||
* The target GitHub repository | ||
*/ | ||
public val repository: String? = null, | ||
/** | ||
* The issue number of an existing issue to update | ||
*/ | ||
public val issueNumber: Int? = null, | ||
/** | ||
* The title of the issue | ||
*/ | ||
public val title: String, | ||
/** | ||
* The file path to the issue content | ||
*/ | ||
public val contentFilepath: String? = null, | ||
/** | ||
* A comma or newline-separated list of labels | ||
*/ | ||
public val labels: List<String>? = null, | ||
/** | ||
* A comma or newline-separated list of assignees (GitHub usernames) | ||
*/ | ||
public val assignees: List<String>? = null, | ||
/** | ||
* Type-unsafe map where you can put any inputs that are not yet supported by the binding | ||
*/ | ||
public val _customInputs: Map<String, String> = mapOf(), | ||
/** | ||
* Allows overriding action's version, for example to use a specific minor version, or a newer | ||
* version that the binding doesn't yet know about | ||
*/ | ||
public val _customVersion: String? = null, | ||
) : RegularAction<CreateIssueFromFileV5.Outputs>("peter-evans", "create-issue-from-file", | ||
_customVersion ?: "v5") { | ||
public constructor( | ||
vararg pleaseUseNamedArguments: Unit, | ||
token: String? = null, | ||
repository: String? = null, | ||
issueNumber: Int? = null, | ||
title: String, | ||
contentFilepath: String? = null, | ||
labels: List<String>? = null, | ||
assignees: List<String>? = null, | ||
_customInputs: Map<String, String> = mapOf(), | ||
_customVersion: String? = null, | ||
) : this(token=token, repository=repository, issueNumber=issueNumber, title=title, | ||
contentFilepath=contentFilepath, labels=labels, assignees=assignees, | ||
_customInputs=_customInputs, _customVersion=_customVersion) | ||
|
||
@Suppress("SpreadOperator") | ||
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( | ||
*listOfNotNull( | ||
token?.let { "token" to it }, | ||
repository?.let { "repository" to it }, | ||
issueNumber?.let { "issue-number" to it.toString() }, | ||
"title" to title, | ||
contentFilepath?.let { "content-filepath" to it }, | ||
labels?.let { "labels" to it.joinToString(",") }, | ||
assignees?.let { "assignees" to it.joinToString(",") }, | ||
*_customInputs.toList().toTypedArray(), | ||
).toTypedArray() | ||
) | ||
|
||
override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId) | ||
|
||
public class Outputs( | ||
stepId: String, | ||
) : Action.Outputs(stepId) { | ||
/** | ||
* The number of the created issue | ||
*/ | ||
public val issueNumber: String = "steps.$stepId.outputs.issue-number" | ||
} | ||
} |