Skip to content

Commit

Permalink
feat(actions): add peter-evans/create-issue-from-file@v5
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 committed Feb 5, 2024
1 parent 6b08eda commit dabfa62
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 2 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24452a72d85239eacf1468b0f1982a9f3fec4c94
4 changes: 2 additions & 2 deletions docs/supported-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
@file:Suppress(
"DataClassPrivateConstructor",
"UNUSED_PARAMETER",
"DEPRECATION",
)

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
Expand Down Expand Up @@ -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
Expand Down
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"
}
}

0 comments on commit dabfa62

Please sign in to comment.