From 5e3c2136b09bcc3a485728af00c920d2e09dfba7 Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 22:58:20 +0200 Subject: [PATCH 01/12] Update metadata in PRs Part of https://github.com/typesafegithub/github-actions-typing-catalog/issues/72. --- .github/workflows/update-metadata.main.kts | 26 ++++++++++++++++++++-- .github/workflows/update-metadata.yaml | 10 ++++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-metadata.main.kts b/.github/workflows/update-metadata.main.kts index 4a37bf3..7dcec91 100755 --- a/.github/workflows/update-metadata.main.kts +++ b/.github/workflows/update-metadata.main.kts @@ -11,8 +11,12 @@ import io.github.typesafegithub.workflows.actions.actions.Checkout import io.github.typesafegithub.workflows.actions.actions.SetupJava import io.github.typesafegithub.workflows.annotations.ExperimentalKotlinLogicStep +import io.github.typesafegithub.workflows.domain.Mode +import io.github.typesafegithub.workflows.domain.Permission import io.github.typesafegithub.workflows.domain.RunnerType +import io.github.typesafegithub.workflows.dsl.expressions.expr import io.github.typesafegithub.workflows.dsl.workflow +import io.github.typesafegithub.workflows.domain.triggers.PullRequest import io.github.typesafegithub.workflows.domain.triggers.Push import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG @@ -28,11 +32,17 @@ workflow( checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(), ), sourceFile = __FILE__, - on = listOf(Push(branches = listOf("main"))), + on = listOf( + Push(branches = listOf("main")), + PullRequest(), + ), ) { job( id = "generate", runsOn = RunnerType.UbuntuLatest, + permissions = mapOf( + Permission.Contents to Mode.Write, + ), ) { uses(action = Checkout()) uses(action = SetupJava( @@ -50,11 +60,17 @@ workflow( run(name = "Run generation logic") { removeMetadataFiles() generateMetadataFiles() - commitChanges(github.sha) + val isPullRequest = github.base_ref?.isNotEmpty() == true + if (isPullRequest) { + commitChanges(github.sha) + } else { + checkForChanges() + } } run( name = "Push new commit", command = "git push", + `if` = expr { "github.base_ref != ''" }, ) } } @@ -77,6 +93,12 @@ fun generateMetadataFiles() { } } +fun checkForChanges() { + require(!Git.open(File(".")).status().call().hasUncommittedChanges()) { + "Metadata files changed after regeneration — they are not up to date!" + } +} + fun commitChanges(sha: String) { Git.open(File(".")).apply { add().addFilepattern("typings/").call() diff --git a/.github/workflows/update-metadata.yaml b/.github/workflows/update-metadata.yaml index 5c55a83..62059bd 100644 --- a/.github/workflows/update-metadata.yaml +++ b/.github/workflows/update-metadata.yaml @@ -1,4 +1,4 @@ -# This file was generated using Kotlin DSL (.github/workflows/update-metadata.main.kts). +# This file was generated using Kotlin DSL (.github/workflows/.github/workflows/update-metadata.main.kts). # If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. # Generated with https://github.com/typesafegithub/github-workflows-kt @@ -7,6 +7,7 @@ on: push: branches: - 'main' + pull_request: {} jobs: check_yaml_consistency: name: 'Check YAML consistency' @@ -17,12 +18,14 @@ jobs: uses: 'actions/checkout@v6' - id: 'step-1' name: 'Execute script' - run: 'rm ''.github/workflows/update-metadata.yaml'' && ''.github/workflows/update-metadata.main.kts''' + run: 'rm ''.github/workflows/update-metadata.yaml'' && ''.github/workflows/.github/workflows/update-metadata.main.kts''' - id: 'step-2' name: 'Consistency check' run: 'git diff --exit-code ''.github/workflows/update-metadata.yaml''' generate: runs-on: 'ubuntu-latest' + permissions: + contents: 'write' needs: - 'check_yaml_consistency' steps: @@ -42,7 +45,8 @@ jobs: name: 'Run generation logic' env: GHWKT_GITHUB_CONTEXT_JSON: '${{ toJSON(github) }}' - run: 'GHWKT_RUN_STEP=''update-metadata.yaml:generate:step-3'' ''.github/workflows/update-metadata.main.kts''' + run: 'GHWKT_RUN_STEP=''update-metadata.yaml:generate:step-3'' ''.github/workflows/.github/workflows/update-metadata.main.kts''' - id: 'step-4' name: 'Push new commit' run: 'git push' + if: '${{ github.base_ref != '''' }}' From 5824fda9b494a24c934dd9ac6f63daa1dd64138b Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:02:01 +0200 Subject: [PATCH 02/12] Fix --- ...data.main.kts => validate-update-metadata.main.kts} | 2 +- ...ate-metadata.yaml => validate-update-metadata.yaml} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{update-metadata.main.kts => validate-update-metadata.main.kts} (99%) rename .github/workflows/{update-metadata.yaml => validate-update-metadata.yaml} (72%) diff --git a/.github/workflows/update-metadata.main.kts b/.github/workflows/validate-update-metadata.main.kts similarity index 99% rename from .github/workflows/update-metadata.main.kts rename to .github/workflows/validate-update-metadata.main.kts index 7dcec91..2f36254 100755 --- a/.github/workflows/update-metadata.main.kts +++ b/.github/workflows/validate-update-metadata.main.kts @@ -27,7 +27,7 @@ import java.io.File import org.eclipse.jgit.api.Git workflow( - name = "Update metadata", + name = "Validate/Update metadata", consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy( checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(), ), diff --git a/.github/workflows/update-metadata.yaml b/.github/workflows/validate-update-metadata.yaml similarity index 72% rename from .github/workflows/update-metadata.yaml rename to .github/workflows/validate-update-metadata.yaml index 62059bd..5dc36b5 100644 --- a/.github/workflows/update-metadata.yaml +++ b/.github/workflows/validate-update-metadata.yaml @@ -1,8 +1,8 @@ -# This file was generated using Kotlin DSL (.github/workflows/.github/workflows/update-metadata.main.kts). +# This file was generated using Kotlin DSL (.github/workflows/validate-update-metadata.main.kts). # If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. # Generated with https://github.com/typesafegithub/github-workflows-kt -name: 'Update metadata' +name: 'Validate/Update metadataf' on: push: branches: @@ -18,10 +18,10 @@ jobs: uses: 'actions/checkout@v6' - id: 'step-1' name: 'Execute script' - run: 'rm ''.github/workflows/update-metadata.yaml'' && ''.github/workflows/.github/workflows/update-metadata.main.kts''' + run: 'rm ''.github/workflows/validate-update-metadata.yaml'' && ''.github/workflows/validate-update-metadata.main.kts''' - id: 'step-2' name: 'Consistency check' - run: 'git diff --exit-code ''.github/workflows/update-metadata.yaml''' + run: 'git diff --exit-code ''.github/workflows/validate-update-metadata.yaml''' generate: runs-on: 'ubuntu-latest' permissions: @@ -45,7 +45,7 @@ jobs: name: 'Run generation logic' env: GHWKT_GITHUB_CONTEXT_JSON: '${{ toJSON(github) }}' - run: 'GHWKT_RUN_STEP=''update-metadata.yaml:generate:step-3'' ''.github/workflows/.github/workflows/update-metadata.main.kts''' + run: 'GHWKT_RUN_STEP=''validate-update-metadata.yaml:generate:step-3'' ''.github/workflows/validate-update-metadata.main.kts''' - id: 'step-4' name: 'Push new commit' run: 'git push' From 7abd5d7492e743efed244644bfc9db3fe1762c0a Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:03:11 +0200 Subject: [PATCH 03/12] Fix --- .github/workflows/validate-update-metadata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-update-metadata.yaml b/.github/workflows/validate-update-metadata.yaml index 5dc36b5..3ef19bc 100644 --- a/.github/workflows/validate-update-metadata.yaml +++ b/.github/workflows/validate-update-metadata.yaml @@ -2,7 +2,7 @@ # If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. # Generated with https://github.com/typesafegithub/github-workflows-kt -name: 'Validate/Update metadataf' +name: 'Validate/Update metadata' on: push: branches: From 588d4f39e26ca492652b02da31545026114184f3 Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:09:58 +0200 Subject: [PATCH 04/12] Fix --- .../validate-update-metadata.main.kts | 25 +++++++++++++------ .../workflows/validate-update-metadata.yaml | 4 --- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/validate-update-metadata.main.kts b/.github/workflows/validate-update-metadata.main.kts index 2f36254..72aa448 100755 --- a/.github/workflows/validate-update-metadata.main.kts +++ b/.github/workflows/validate-update-metadata.main.kts @@ -14,7 +14,6 @@ import io.github.typesafegithub.workflows.annotations.ExperimentalKotlinLogicSte import io.github.typesafegithub.workflows.domain.Mode import io.github.typesafegithub.workflows.domain.Permission import io.github.typesafegithub.workflows.domain.RunnerType -import io.github.typesafegithub.workflows.dsl.expressions.expr import io.github.typesafegithub.workflows.dsl.workflow import io.github.typesafegithub.workflows.domain.triggers.PullRequest import io.github.typesafegithub.workflows.domain.triggers.Push @@ -62,16 +61,13 @@ workflow( generateMetadataFiles() val isPullRequest = github.base_ref?.isNotEmpty() == true if (isPullRequest) { - commitChanges(github.sha) + if (commitChanges(github.sha)) { + gitPush() + } } else { checkForChanges() } } - run( - name = "Push new commit", - command = "git push", - `if` = expr { "github.base_ref != ''" }, - ) } } @@ -99,14 +95,27 @@ fun checkForChanges() { } } -fun commitChanges(sha: String) { +fun commitChanges(sha: String): Boolean { Git.open(File(".")).apply { add().addFilepattern("typings/").call() if (status().call().hasUncommittedChanges()) { commit().setMessage("Update metadata for commit $sha").call() + return true } } + return false +} + +fun gitPush() { + val contextJson = System.getenv("GHWKT_GITHUB_CONTEXT_JSON")!! + val headRef = Regex("\"head_ref\"\\s*:\\s*\"([^\"]+)\"") + .find(contextJson)!!.groupValues[1] + val process = ProcessBuilder("git", "push", "origin", "HEAD:refs/heads/$headRef") + .inheritIO() + .start() + val exitCode = process.waitFor() + check(exitCode == 0) { "git push failed with exit code $exitCode" } } fun writeToMetadataFile(actionRootDir: File, versionsWithTypings: List) { diff --git a/.github/workflows/validate-update-metadata.yaml b/.github/workflows/validate-update-metadata.yaml index 3ef19bc..c3ffbf1 100644 --- a/.github/workflows/validate-update-metadata.yaml +++ b/.github/workflows/validate-update-metadata.yaml @@ -46,7 +46,3 @@ jobs: env: GHWKT_GITHUB_CONTEXT_JSON: '${{ toJSON(github) }}' run: 'GHWKT_RUN_STEP=''validate-update-metadata.yaml:generate:step-3'' ''.github/workflows/validate-update-metadata.main.kts''' - - id: 'step-4' - name: 'Push new commit' - run: 'git push' - if: '${{ github.base_ref != '''' }}' From f835ea6b8362fff7052adce7f5aa115bbd54b693 Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:12:58 +0200 Subject: [PATCH 05/12] Trigger regeneration --- typings/actions/stale/v8/action-types.yml | 176 ---------------------- 1 file changed, 176 deletions(-) delete mode 100644 typings/actions/stale/v8/action-types.yml diff --git a/typings/actions/stale/v8/action-types.yml b/typings/actions/stale/v8/action-types.yml deleted file mode 100644 index 9865eaa..0000000 --- a/typings/actions/stale/v8/action-types.yml +++ /dev/null @@ -1,176 +0,0 @@ -# See https://github.com/typesafegithub/github-actions-typing -inputs: - repo-token: - type: string - stale-issue-message: - type: string - stale-pr-message: - type: string - close-issue-message: - type: string - close-pr-message: - type: string - days-before-stale: - type: float - days-before-issue-stale: - type: string - days-before-pr-stale: - type: integer - name: Days - named-values: - Never: -1 - days-before-close: - type: integer - days-before-issue-close: - type: integer - name: Days - named-values: - Never: -1 - days-before-pr-close: - type: integer - name: Days - named-values: - Never: -1 - stale-issue-label: - type: string - close-issue-label: - type: string - exempt-issue-labels: - type: list - separator: ',' - list-item: - type: string - close-issue-reason: - type: enum - allowed-values: - - completed - - not_planned - stale-pr-label: - type: string - close-pr-label: - type: string - exempt-pr-labels: - type: list - separator: ',' - list-item: - type: string - exempt-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-issue-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-pr-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-all-milestones: - type: boolean - exempt-all-issue-milestones: - type: boolean - exempt-all-pr-milestones: - type: boolean - only-labels: - type: list - separator: ',' - list-item: - type: string - any-of-labels: - type: list - separator: ',' - list-item: - type: string - any-of-issue-labels: - type: list - separator: ',' - list-item: - type: string - any-of-pr-labels: - type: list - separator: ',' - list-item: - type: string - only-issue-labels: - type: list - separator: ',' - list-item: - type: string - only-pr-labels: - type: list - separator: ',' - list-item: - type: string - operations-per-run: - type: integer - remove-stale-when-updated: - type: boolean - remove-issue-stale-when-updated: - type: boolean - remove-pr-stale-when-updated: - type: boolean - debug-only: - type: boolean - ascending: - type: boolean - delete-branch: - type: boolean - start-date: - type: string - exempt-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-issue-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-pr-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-all-assignees: - type: boolean - exempt-all-issue-assignees: - type: string - exempt-all-pr-assignees: - type: boolean - exempt-draft-pr: - type: boolean - enable-statistics: - type: boolean - labels-to-add-when-unstale: - type: list - separator: ',' - list-item: - type: string - labels-to-remove-when-stale: - type: list - separator: ',' - list-item: - type: string - labels-to-remove-when-unstale: - type: list - separator: ',' - list-item: - type: string - ignore-updates: - type: boolean - ignore-issue-updates: - type: boolean - ignore-pr-updates: - type: boolean - include-only-assigned: - type: boolean -outputs: - closed-issues-prs: - type: string - staled-issues-prs: - type: string From b08a816cc29381f6ee0e28c018be62645389359a Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:20:05 +0200 Subject: [PATCH 06/12] Fix --- .../validate-update-metadata.main.kts | 22 ++++++------------- .../workflows/validate-update-metadata.yaml | 5 +---- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/validate-update-metadata.main.kts b/.github/workflows/validate-update-metadata.main.kts index 72aa448..45a74c0 100755 --- a/.github/workflows/validate-update-metadata.main.kts +++ b/.github/workflows/validate-update-metadata.main.kts @@ -15,7 +15,6 @@ import io.github.typesafegithub.workflows.domain.Mode import io.github.typesafegithub.workflows.domain.Permission import io.github.typesafegithub.workflows.domain.RunnerType import io.github.typesafegithub.workflows.dsl.workflow -import io.github.typesafegithub.workflows.domain.triggers.PullRequest import io.github.typesafegithub.workflows.domain.triggers.Push import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG @@ -32,8 +31,7 @@ workflow( ), sourceFile = __FILE__, on = listOf( - Push(branches = listOf("main")), - PullRequest(), + Push(), ), ) { job( @@ -59,13 +57,12 @@ workflow( run(name = "Run generation logic") { removeMetadataFiles() generateMetadataFiles() - val isPullRequest = github.base_ref?.isNotEmpty() == true - if (isPullRequest) { + if (github.ref == "main") { + checkForChanges() + } else { if (commitChanges(github.sha)) { gitPush() } - } else { - checkForChanges() } } } @@ -108,14 +105,9 @@ fun commitChanges(sha: String): Boolean { } fun gitPush() { - val contextJson = System.getenv("GHWKT_GITHUB_CONTEXT_JSON")!! - val headRef = Regex("\"head_ref\"\\s*:\\s*\"([^\"]+)\"") - .find(contextJson)!!.groupValues[1] - val process = ProcessBuilder("git", "push", "origin", "HEAD:refs/heads/$headRef") - .inheritIO() - .start() - val exitCode = process.waitFor() - check(exitCode == 0) { "git push failed with exit code $exitCode" } + val process = ProcessBuilder("git", "push") + .inheritIO().start() + check(process.waitFor() == 0) { "git push failed" } } fun writeToMetadataFile(actionRootDir: File, versionsWithTypings: List) { diff --git a/.github/workflows/validate-update-metadata.yaml b/.github/workflows/validate-update-metadata.yaml index c3ffbf1..20f910c 100644 --- a/.github/workflows/validate-update-metadata.yaml +++ b/.github/workflows/validate-update-metadata.yaml @@ -4,10 +4,7 @@ name: 'Validate/Update metadata' on: - push: - branches: - - 'main' - pull_request: {} + push: {} jobs: check_yaml_consistency: name: 'Check YAML consistency' From e03ab4cbdeb644b4cecdb720065ec03b1b30bc0e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 21:21:44 +0000 Subject: [PATCH 07/12] Update metadata for commit b08a816cc29381f6ee0e28c018be62645389359a --- typings/actions/stale/metadata.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/typings/actions/stale/metadata.yml b/typings/actions/stale/metadata.yml index b7e6d95..b8153f4 100644 --- a/typings/actions/stale/metadata.yml +++ b/typings/actions/stale/metadata.yml @@ -2,6 +2,5 @@ - "v5" - "v6" - "v7" -- "v8" - "v9" - "v10" From dbdbee9d7a898627cf126340ece9e227201ae8ab Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:24:20 +0200 Subject: [PATCH 08/12] Restore --- .../validate-update-metadata.main.kts | 4 +- typings/actions/stale/v8/action-types.yml | 176 ++++++++++++++++++ 2 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 typings/actions/stale/v8/action-types.yml diff --git a/.github/workflows/validate-update-metadata.main.kts b/.github/workflows/validate-update-metadata.main.kts index 45a74c0..d8f11d0 100755 --- a/.github/workflows/validate-update-metadata.main.kts +++ b/.github/workflows/validate-update-metadata.main.kts @@ -30,9 +30,7 @@ workflow( checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(), ), sourceFile = __FILE__, - on = listOf( - Push(), - ), + on = listOf(Push()), ) { job( id = "generate", diff --git a/typings/actions/stale/v8/action-types.yml b/typings/actions/stale/v8/action-types.yml new file mode 100644 index 0000000..9865eaa --- /dev/null +++ b/typings/actions/stale/v8/action-types.yml @@ -0,0 +1,176 @@ +# See https://github.com/typesafegithub/github-actions-typing +inputs: + repo-token: + type: string + stale-issue-message: + type: string + stale-pr-message: + type: string + close-issue-message: + type: string + close-pr-message: + type: string + days-before-stale: + type: float + days-before-issue-stale: + type: string + days-before-pr-stale: + type: integer + name: Days + named-values: + Never: -1 + days-before-close: + type: integer + days-before-issue-close: + type: integer + name: Days + named-values: + Never: -1 + days-before-pr-close: + type: integer + name: Days + named-values: + Never: -1 + stale-issue-label: + type: string + close-issue-label: + type: string + exempt-issue-labels: + type: list + separator: ',' + list-item: + type: string + close-issue-reason: + type: enum + allowed-values: + - completed + - not_planned + stale-pr-label: + type: string + close-pr-label: + type: string + exempt-pr-labels: + type: list + separator: ',' + list-item: + type: string + exempt-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-issue-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-pr-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-all-milestones: + type: boolean + exempt-all-issue-milestones: + type: boolean + exempt-all-pr-milestones: + type: boolean + only-labels: + type: list + separator: ',' + list-item: + type: string + any-of-labels: + type: list + separator: ',' + list-item: + type: string + any-of-issue-labels: + type: list + separator: ',' + list-item: + type: string + any-of-pr-labels: + type: list + separator: ',' + list-item: + type: string + only-issue-labels: + type: list + separator: ',' + list-item: + type: string + only-pr-labels: + type: list + separator: ',' + list-item: + type: string + operations-per-run: + type: integer + remove-stale-when-updated: + type: boolean + remove-issue-stale-when-updated: + type: boolean + remove-pr-stale-when-updated: + type: boolean + debug-only: + type: boolean + ascending: + type: boolean + delete-branch: + type: boolean + start-date: + type: string + exempt-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-issue-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-pr-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-all-assignees: + type: boolean + exempt-all-issue-assignees: + type: string + exempt-all-pr-assignees: + type: boolean + exempt-draft-pr: + type: boolean + enable-statistics: + type: boolean + labels-to-add-when-unstale: + type: list + separator: ',' + list-item: + type: string + labels-to-remove-when-stale: + type: list + separator: ',' + list-item: + type: string + labels-to-remove-when-unstale: + type: list + separator: ',' + list-item: + type: string + ignore-updates: + type: boolean + ignore-issue-updates: + type: boolean + ignore-pr-updates: + type: boolean + include-only-assigned: + type: boolean +outputs: + closed-issues-prs: + type: string + staled-issues-prs: + type: string From 802e81a5bec56b3c17ac85dc5c2f25429d8615f1 Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:27:01 +0200 Subject: [PATCH 09/12] Remove perms, remove one mv --- .../validate-update-metadata.main.kts | 5 - .../workflows/validate-update-metadata.yaml | 2 - typings/actions/stale/v7/action-types.yml | 171 ----------------- typings/actions/stale/v8/action-types.yml | 176 ------------------ 4 files changed, 354 deletions(-) delete mode 100644 typings/actions/stale/v7/action-types.yml delete mode 100644 typings/actions/stale/v8/action-types.yml diff --git a/.github/workflows/validate-update-metadata.main.kts b/.github/workflows/validate-update-metadata.main.kts index d8f11d0..5915ee7 100755 --- a/.github/workflows/validate-update-metadata.main.kts +++ b/.github/workflows/validate-update-metadata.main.kts @@ -11,8 +11,6 @@ import io.github.typesafegithub.workflows.actions.actions.Checkout import io.github.typesafegithub.workflows.actions.actions.SetupJava import io.github.typesafegithub.workflows.annotations.ExperimentalKotlinLogicStep -import io.github.typesafegithub.workflows.domain.Mode -import io.github.typesafegithub.workflows.domain.Permission import io.github.typesafegithub.workflows.domain.RunnerType import io.github.typesafegithub.workflows.dsl.workflow import io.github.typesafegithub.workflows.domain.triggers.Push @@ -35,9 +33,6 @@ workflow( job( id = "generate", runsOn = RunnerType.UbuntuLatest, - permissions = mapOf( - Permission.Contents to Mode.Write, - ), ) { uses(action = Checkout()) uses(action = SetupJava( diff --git a/.github/workflows/validate-update-metadata.yaml b/.github/workflows/validate-update-metadata.yaml index 20f910c..2ce3da9 100644 --- a/.github/workflows/validate-update-metadata.yaml +++ b/.github/workflows/validate-update-metadata.yaml @@ -21,8 +21,6 @@ jobs: run: 'git diff --exit-code ''.github/workflows/validate-update-metadata.yaml''' generate: runs-on: 'ubuntu-latest' - permissions: - contents: 'write' needs: - 'check_yaml_consistency' steps: diff --git a/typings/actions/stale/v7/action-types.yml b/typings/actions/stale/v7/action-types.yml deleted file mode 100644 index 5b5620a..0000000 --- a/typings/actions/stale/v7/action-types.yml +++ /dev/null @@ -1,171 +0,0 @@ -# See https://github.com/typesafegithub/github-actions-typing -inputs: - repo-token: - type: string - stale-issue-message: - type: string - stale-pr-message: - type: string - close-issue-message: - type: string - close-pr-message: - type: string - days-before-stale: - type: float - days-before-issue-stale: - type: string - days-before-pr-stale: - type: integer - name: Days - named-values: - Never: -1 - days-before-close: - type: integer - days-before-issue-close: - type: integer - name: Days - named-values: - Never: -1 - days-before-pr-close: - type: integer - name: Days - named-values: - Never: -1 - stale-issue-label: - type: string - close-issue-label: - type: string - exempt-issue-labels: - type: list - separator: ',' - list-item: - type: string - close-issue-reason: - type: enum - allowed-values: - - completed - - not_planned - stale-pr-label: - type: string - close-pr-label: - type: string - exempt-pr-labels: - type: list - separator: ',' - list-item: - type: string - exempt-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-issue-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-pr-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-all-milestones: - type: boolean - exempt-all-issue-milestones: - type: boolean - exempt-all-pr-milestones: - type: boolean - only-labels: - type: list - separator: ',' - list-item: - type: string - any-of-labels: - type: list - separator: ',' - list-item: - type: string - any-of-issue-labels: - type: list - separator: ',' - list-item: - type: string - any-of-pr-labels: - type: list - separator: ',' - list-item: - type: string - only-issue-labels: - type: list - separator: ',' - list-item: - type: string - only-pr-labels: - type: list - separator: ',' - list-item: - type: string - operations-per-run: - type: integer - remove-stale-when-updated: - type: boolean - remove-issue-stale-when-updated: - type: boolean - remove-pr-stale-when-updated: - type: boolean - debug-only: - type: boolean - ascending: - type: boolean - delete-branch: - type: boolean - start-date: - type: string - exempt-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-issue-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-pr-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-all-assignees: - type: boolean - exempt-all-issue-assignees: - type: string - exempt-all-pr-assignees: - type: boolean - exempt-draft-pr: - type: boolean - enable-statistics: - type: boolean - labels-to-add-when-unstale: - type: list - separator: ',' - list-item: - type: string - labels-to-remove-when-unstale: - type: list - separator: ',' - list-item: - type: string - ignore-updates: - type: boolean - ignore-issue-updates: - type: boolean - ignore-pr-updates: - type: boolean - include-only-assigned: - type: boolean -outputs: - closed-issues-prs: - type: string - staled-issues-prs: - type: string diff --git a/typings/actions/stale/v8/action-types.yml b/typings/actions/stale/v8/action-types.yml deleted file mode 100644 index 9865eaa..0000000 --- a/typings/actions/stale/v8/action-types.yml +++ /dev/null @@ -1,176 +0,0 @@ -# See https://github.com/typesafegithub/github-actions-typing -inputs: - repo-token: - type: string - stale-issue-message: - type: string - stale-pr-message: - type: string - close-issue-message: - type: string - close-pr-message: - type: string - days-before-stale: - type: float - days-before-issue-stale: - type: string - days-before-pr-stale: - type: integer - name: Days - named-values: - Never: -1 - days-before-close: - type: integer - days-before-issue-close: - type: integer - name: Days - named-values: - Never: -1 - days-before-pr-close: - type: integer - name: Days - named-values: - Never: -1 - stale-issue-label: - type: string - close-issue-label: - type: string - exempt-issue-labels: - type: list - separator: ',' - list-item: - type: string - close-issue-reason: - type: enum - allowed-values: - - completed - - not_planned - stale-pr-label: - type: string - close-pr-label: - type: string - exempt-pr-labels: - type: list - separator: ',' - list-item: - type: string - exempt-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-issue-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-pr-milestones: - type: list - separator: ',' - list-item: - type: string - exempt-all-milestones: - type: boolean - exempt-all-issue-milestones: - type: boolean - exempt-all-pr-milestones: - type: boolean - only-labels: - type: list - separator: ',' - list-item: - type: string - any-of-labels: - type: list - separator: ',' - list-item: - type: string - any-of-issue-labels: - type: list - separator: ',' - list-item: - type: string - any-of-pr-labels: - type: list - separator: ',' - list-item: - type: string - only-issue-labels: - type: list - separator: ',' - list-item: - type: string - only-pr-labels: - type: list - separator: ',' - list-item: - type: string - operations-per-run: - type: integer - remove-stale-when-updated: - type: boolean - remove-issue-stale-when-updated: - type: boolean - remove-pr-stale-when-updated: - type: boolean - debug-only: - type: boolean - ascending: - type: boolean - delete-branch: - type: boolean - start-date: - type: string - exempt-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-issue-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-pr-assignees: - type: list - separator: ',' - list-item: - type: string - exempt-all-assignees: - type: boolean - exempt-all-issue-assignees: - type: string - exempt-all-pr-assignees: - type: boolean - exempt-draft-pr: - type: boolean - enable-statistics: - type: boolean - labels-to-add-when-unstale: - type: list - separator: ',' - list-item: - type: string - labels-to-remove-when-stale: - type: list - separator: ',' - list-item: - type: string - labels-to-remove-when-unstale: - type: list - separator: ',' - list-item: - type: string - ignore-updates: - type: boolean - ignore-issue-updates: - type: boolean - ignore-pr-updates: - type: boolean - include-only-assigned: - type: boolean -outputs: - closed-issues-prs: - type: string - staled-issues-prs: - type: string From 7db99f03e14701bda63c04b0cdb4b8cc833718ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 21:28:46 +0000 Subject: [PATCH 10/12] Update metadata for commit 802e81a5bec56b3c17ac85dc5c2f25429d8615f1 --- typings/actions/stale/metadata.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/typings/actions/stale/metadata.yml b/typings/actions/stale/metadata.yml index b8153f4..dee2ff5 100644 --- a/typings/actions/stale/metadata.yml +++ b/typings/actions/stale/metadata.yml @@ -1,6 +1,5 @@ "versionsWithTypings": - "v5" - "v6" -- "v7" - "v9" - "v10" From eee963276cf556dc59038a0f7da38c13ea267c21 Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:31:58 +0200 Subject: [PATCH 11/12] Restore --- typings/actions/stale/metadata.yml | 2 + typings/actions/stale/v7/action-types.yml | 171 +++++++++++++++++++++ typings/actions/stale/v8/action-types.yml | 176 ++++++++++++++++++++++ 3 files changed, 349 insertions(+) create mode 100644 typings/actions/stale/v7/action-types.yml create mode 100644 typings/actions/stale/v8/action-types.yml diff --git a/typings/actions/stale/metadata.yml b/typings/actions/stale/metadata.yml index dee2ff5..b7e6d95 100644 --- a/typings/actions/stale/metadata.yml +++ b/typings/actions/stale/metadata.yml @@ -1,5 +1,7 @@ "versionsWithTypings": - "v5" - "v6" +- "v7" +- "v8" - "v9" - "v10" diff --git a/typings/actions/stale/v7/action-types.yml b/typings/actions/stale/v7/action-types.yml new file mode 100644 index 0000000..5b5620a --- /dev/null +++ b/typings/actions/stale/v7/action-types.yml @@ -0,0 +1,171 @@ +# See https://github.com/typesafegithub/github-actions-typing +inputs: + repo-token: + type: string + stale-issue-message: + type: string + stale-pr-message: + type: string + close-issue-message: + type: string + close-pr-message: + type: string + days-before-stale: + type: float + days-before-issue-stale: + type: string + days-before-pr-stale: + type: integer + name: Days + named-values: + Never: -1 + days-before-close: + type: integer + days-before-issue-close: + type: integer + name: Days + named-values: + Never: -1 + days-before-pr-close: + type: integer + name: Days + named-values: + Never: -1 + stale-issue-label: + type: string + close-issue-label: + type: string + exempt-issue-labels: + type: list + separator: ',' + list-item: + type: string + close-issue-reason: + type: enum + allowed-values: + - completed + - not_planned + stale-pr-label: + type: string + close-pr-label: + type: string + exempt-pr-labels: + type: list + separator: ',' + list-item: + type: string + exempt-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-issue-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-pr-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-all-milestones: + type: boolean + exempt-all-issue-milestones: + type: boolean + exempt-all-pr-milestones: + type: boolean + only-labels: + type: list + separator: ',' + list-item: + type: string + any-of-labels: + type: list + separator: ',' + list-item: + type: string + any-of-issue-labels: + type: list + separator: ',' + list-item: + type: string + any-of-pr-labels: + type: list + separator: ',' + list-item: + type: string + only-issue-labels: + type: list + separator: ',' + list-item: + type: string + only-pr-labels: + type: list + separator: ',' + list-item: + type: string + operations-per-run: + type: integer + remove-stale-when-updated: + type: boolean + remove-issue-stale-when-updated: + type: boolean + remove-pr-stale-when-updated: + type: boolean + debug-only: + type: boolean + ascending: + type: boolean + delete-branch: + type: boolean + start-date: + type: string + exempt-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-issue-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-pr-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-all-assignees: + type: boolean + exempt-all-issue-assignees: + type: string + exempt-all-pr-assignees: + type: boolean + exempt-draft-pr: + type: boolean + enable-statistics: + type: boolean + labels-to-add-when-unstale: + type: list + separator: ',' + list-item: + type: string + labels-to-remove-when-unstale: + type: list + separator: ',' + list-item: + type: string + ignore-updates: + type: boolean + ignore-issue-updates: + type: boolean + ignore-pr-updates: + type: boolean + include-only-assigned: + type: boolean +outputs: + closed-issues-prs: + type: string + staled-issues-prs: + type: string diff --git a/typings/actions/stale/v8/action-types.yml b/typings/actions/stale/v8/action-types.yml new file mode 100644 index 0000000..9865eaa --- /dev/null +++ b/typings/actions/stale/v8/action-types.yml @@ -0,0 +1,176 @@ +# See https://github.com/typesafegithub/github-actions-typing +inputs: + repo-token: + type: string + stale-issue-message: + type: string + stale-pr-message: + type: string + close-issue-message: + type: string + close-pr-message: + type: string + days-before-stale: + type: float + days-before-issue-stale: + type: string + days-before-pr-stale: + type: integer + name: Days + named-values: + Never: -1 + days-before-close: + type: integer + days-before-issue-close: + type: integer + name: Days + named-values: + Never: -1 + days-before-pr-close: + type: integer + name: Days + named-values: + Never: -1 + stale-issue-label: + type: string + close-issue-label: + type: string + exempt-issue-labels: + type: list + separator: ',' + list-item: + type: string + close-issue-reason: + type: enum + allowed-values: + - completed + - not_planned + stale-pr-label: + type: string + close-pr-label: + type: string + exempt-pr-labels: + type: list + separator: ',' + list-item: + type: string + exempt-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-issue-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-pr-milestones: + type: list + separator: ',' + list-item: + type: string + exempt-all-milestones: + type: boolean + exempt-all-issue-milestones: + type: boolean + exempt-all-pr-milestones: + type: boolean + only-labels: + type: list + separator: ',' + list-item: + type: string + any-of-labels: + type: list + separator: ',' + list-item: + type: string + any-of-issue-labels: + type: list + separator: ',' + list-item: + type: string + any-of-pr-labels: + type: list + separator: ',' + list-item: + type: string + only-issue-labels: + type: list + separator: ',' + list-item: + type: string + only-pr-labels: + type: list + separator: ',' + list-item: + type: string + operations-per-run: + type: integer + remove-stale-when-updated: + type: boolean + remove-issue-stale-when-updated: + type: boolean + remove-pr-stale-when-updated: + type: boolean + debug-only: + type: boolean + ascending: + type: boolean + delete-branch: + type: boolean + start-date: + type: string + exempt-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-issue-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-pr-assignees: + type: list + separator: ',' + list-item: + type: string + exempt-all-assignees: + type: boolean + exempt-all-issue-assignees: + type: string + exempt-all-pr-assignees: + type: boolean + exempt-draft-pr: + type: boolean + enable-statistics: + type: boolean + labels-to-add-when-unstale: + type: list + separator: ',' + list-item: + type: string + labels-to-remove-when-stale: + type: list + separator: ',' + list-item: + type: string + labels-to-remove-when-unstale: + type: list + separator: ',' + list-item: + type: string + ignore-updates: + type: boolean + ignore-issue-updates: + type: boolean + ignore-pr-updates: + type: boolean + include-only-assigned: + type: boolean +outputs: + closed-issues-prs: + type: string + staled-issues-prs: + type: string From 883bf0c1b87d0d4639a77d6f15ee197089d84a02 Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Fri, 15 May 2026 23:33:18 +0200 Subject: [PATCH 12/12] Logging --- .github/workflows/validate-update-metadata.main.kts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/validate-update-metadata.main.kts b/.github/workflows/validate-update-metadata.main.kts index 5915ee7..47bd848 100755 --- a/.github/workflows/validate-update-metadata.main.kts +++ b/.github/workflows/validate-update-metadata.main.kts @@ -51,10 +51,15 @@ workflow( removeMetadataFiles() generateMetadataFiles() if (github.ref == "main") { + println("Main branch - just validating") checkForChanges() } else { + println("Non-main branch...") if (commitChanges(github.sha)) { + println("Committing changes") gitPush() + } else { + println("Nothing to commit") } } }