support `script-file` - path to a file.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- github-actions, javascript
- Área
- ci-cd
Línea de trabajo
Review the action.yml and the documented sibling action.js workaround first, then trace how the existing script input is handled. Define support for absolute and repository-root-relative script paths, reject the file:// protocol, and verify that a JavaScript file can be used by github-script.
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.
passing JS as a multiline string parameter makes the script inaccessible to lint tools.
Describe the solution you'd like
It would be nice if I could write the action in a JS file, enjoying linters and any in-IDE help I can get, while still coding for github-script.
Describe alternatives you've considered
The work around, as documented is, for example, in a step that is a part of another compound action:
- uses: actions/github-script@v7
with:
script: |
const action = require('${{ github.action_path }}/action.js');
await action({ core, context /* ... and more by need... */ });
and in action.js as sibling file to my action.yml
module.exports = async ({ core, context, /* ... and more by need... */ }) => {
//...
}
Additional context
which is a work around, and assumes a paths structure.
The action could support it just as easy :)
Generalizing from that - I believe we can support expecting just an absolute path, or a path relative to repo root (with the Distinction is if it starts with / - its absolute, input check should deny file:// protocol.
- 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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de actions/github-script
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
actions/github-script#728 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
actions/github-script#727 · 1 reacción ·
-
{ Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
actions/github-script#724 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
actions/github-script#723 · 1 comentario ·
-
Immutable releases Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
actions/github-script#706 · 1 comentario · 14 reacciones ·