support `script-file` - path to a file.
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- github-actions, javascript
- 領域
- ci-cd
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 5k
- フォーク
- 586
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
actions/github-script のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
actions/github-script#728 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
actions/github-script#727 · リアクション 1 件 ·
-
{ オープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
actions/github-script#724 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
actions/github-script#723 · コメント 1 件 ·
-
Immutable releases オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
actions/github-script#706 · コメント 1 件 · リアクション 14 件 ·