Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Support setting a post hook

オープン
#592 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
github-actions, javascript, node.js, typescript
領域
ci-cd, devops, tooling

調査の方向性

Start by tracing the existing github-script action entry point and how it handles the script input, then compare the node20 post-hook model and core.saveState behavior described in the issue. Done means a new post input runs cleanup after the job while preserving existing usage and supporting shared state.

索引モデルが issue の本文から書いたものです。

説明

Is your feature request related to a problem? Please describe.
With actions/github script it's not possible to setup some cleanup logic to run at the end of the job.

Describe the solution you'd like
A post hook is supported by node20 actions. Adding support for this would not be too difficult on github-script, as it's just a separate function that can be set on an additional post input.

The change would be fully backwards compatible and not too disruptive.

Usage would look like this:

    - name: My github script
      uses: actions/github-script@v7
      with:
        script: |
          console.log("Running my github script");
        post: |
          console.log("Running cleanup logic for my github script");

State sharing between both scripts would be supported out of the box by core.saveState, so this would be a very powerful addition.

I'm willing to work on a PR for this feature in the next few days.

Describe alternatives you've considered

  • Using an additional action with if: always() for cleanup, this requires putting the cleanup step at the end of the job, potentially far from the step it's cleaning after.
  • Using a node action directly: this would require duplicating parts of this project for toolkit set up.

Additional context

Use case where the need for this has come up: creating a "check" (github.rest.checks.create) at the beginning of a job, and making sure the check is marked as completed at the end (either with success or failure based on the job status)

主要言語
TypeScript
スター
5k
フォーク
586
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

actions/github-script のほかの issue

actions/github-script の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。