Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Support setting a post hook

Abierto
#592 1 comentario 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
github-actions, javascript, node.js, typescript
Área
ci-cd, devops, tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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)

Lenguaje dominante
TypeScript
Estrellas
5k
Forks
586
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de actions/github-script

Todos los issues de actions/github-script

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.