From dabfa626a55cb814b3d3b73d7aec3f68d3853789 Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Mon, 5 Feb 2024 15:21:00 +0100 Subject: [PATCH] feat(actions): add peter-evans/create-issue-from-file@v5 --- .../create-issue-from-file/v5/action | 0 .../create-issue-from-file/v5/commit-hash.txt | 1 + docs/supported-actions.md | 4 +- .../peterevans/CreateIssueFromFileV4.kt | 6 + .../peterevans/CreateIssueFromFileV5.kt | 121 ++++++++++++++++++ 5 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 actions/peter-evans/create-issue-from-file/v5/action create mode 100644 actions/peter-evans/create-issue-from-file/v5/commit-hash.txt create mode 100644 github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV5.kt diff --git a/actions/peter-evans/create-issue-from-file/v5/action b/actions/peter-evans/create-issue-from-file/v5/action new file mode 100644 index 000000000..e69de29bb diff --git a/actions/peter-evans/create-issue-from-file/v5/commit-hash.txt b/actions/peter-evans/create-issue-from-file/v5/commit-hash.txt new file mode 100644 index 000000000..b0ecbda11 --- /dev/null +++ b/actions/peter-evans/create-issue-from-file/v5/commit-hash.txt @@ -0,0 +1 @@ +24452a72d85239eacf1468b0f1982a9f3fec4c94 \ No newline at end of file diff --git a/docs/supported-actions.md b/docs/supported-actions.md index 4afce34c5..293fb001a 100644 --- a/docs/supported-actions.md +++ b/docs/supported-actions.md @@ -112,7 +112,7 @@ Click on a version to see the binding's code. * [actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) - v3: [`ActionsGhPagesV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peaceiris/ActionsGhPagesV3.kt) * [actions-hugo](https://github.com/peaceiris/actions-hugo) - v2: [`ActionsHugoV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peaceiris/ActionsHugoV2.kt) * peter-evans - * [create-issue-from-file](https://github.com/peter-evans/create-issue-from-file) - v4: [`CreateIssueFromFileV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV4.kt) + * [create-issue-from-file](https://github.com/peter-evans/create-issue-from-file) - v4: [`CreateIssueFromFileV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV4.kt), v5: [`CreateIssueFromFileV5`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV5.kt) * [create-pull-request](https://github.com/peter-evans/create-pull-request) - v4: [`CreatePullRequestV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreatePullRequestV4.kt), v5: [`CreatePullRequestV5`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreatePullRequestV5.kt) * ReactiveCircus * [android-emulator-runner](https://github.com/ReactiveCircus/android-emulator-runner) - v2 ✅: [`AndroidEmulatorRunnerV2`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/reactivecircus/AndroidEmulatorRunnerV2.kt) @@ -140,6 +140,6 @@ Click on a version to see the binding's code. Number of bindings available: * counting by actions: 84 -* counting each version separately: 154 +* counting each version separately: 155 Actions [providing typings](https://github.com/typesafegithub/github-actions-typing/) (marked with ✅ on the above list): 18 diff --git a/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV4.kt b/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV4.kt index 527c954ed..fd85a03b5 100644 --- a/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV4.kt +++ b/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV4.kt @@ -4,6 +4,7 @@ @file:Suppress( "DataClassPrivateConstructor", "UNUSED_PARAMETER", + "DEPRECATION", ) package io.github.typesafegithub.workflows.actions.peterevans @@ -11,6 +12,7 @@ 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.Deprecated import kotlin.Int import kotlin.String import kotlin.Suppress @@ -39,6 +41,10 @@ import kotlin.collections.toTypedArray * @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 */ +@Deprecated( + message = "This action has a newer major version: CreateIssueFromFileV5", + replaceWith = ReplaceWith("CreateIssueFromFileV5"), +) public data class CreateIssueFromFileV4 private constructor( /** * The GitHub authentication token diff --git a/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV5.kt b/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV5.kt new file mode 100644 index 000000000..1e714eee2 --- /dev/null +++ b/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/peterevans/CreateIssueFromFileV5.kt @@ -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? = null, + /** + * A comma or newline-separated list of assignees (GitHub usernames) + */ + public val assignees: List? = null, + /** + * Type-unsafe map where you can put any inputs that are not yet supported by the binding + */ + public val _customInputs: Map = 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("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? = null, + assignees: List? = null, + _customInputs: Map = 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 = 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" + } +}