Documentation bug: expression numbers are mis-documented
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github-actions, javascript
調査の方向性
GitHub Actions の式構文ページにある「Literals」セクションから始め、Free、Pro、Teams、GHES、GHEC の各バージョンを比較してください。expressions/src/data/string.ts の 14–16 行目にある参照先の parser ソースと、リンク先の Number coercion rules を確認してください。すべての対象ページで、受け入れられる Number literals がドキュメントに正確に記載されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
The "Literals" section of the GitHub Actions expression syntax page:
https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#literals
That link is for the "Free, Pro, and Teams" page, but the GHES and GHEC pages are also affected.
What part(s) of the article would you like to see updated?
The number literal is documented as "Any number format supported by JSON." However, in reality, the GitHub Actions expression parser takes a much larger set of literals, which it coerces to numbers.
For example, neither hex nor octal literals are valid in JSON, but GitHub Actions accepts them. For example:
${{ 0xff }}
${{ 0o777 }}
More generally, GitHub Actions appears to support any number literal that the JavaScript Number(...) constructor can coerce a string from. Those coercion rules are documented here:
This can be seen in the official GitHub Actions expression parser, which appears to use the Number(...) constructor when turning a StringData lexeme into a number:
Additional information
Yes, this is trivially reproducible in any GitHub Actions workflow or action definition.
See https://github.com/zizmorcore/zizmor/pull/1628 for a related downstream report.
- 主要言語
- TypeScript
- スター
- 20.9k
- フォーク
- 68.8k
- 平均マージ
- 13時間 43分
- マージ済み PR(30日)
- 110
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/docs のほかの issue
-
builder persona content
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
localization
難易度 2/5 1〜2日 初心者へのやさしさ 72/100
-
builder persona
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
content localization
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
content localization
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ontola/atomic-server#1625 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
melgarafael/DeskcommCRM#1451 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
bug via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bot:ai-assisted component:compact-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
midnightntwrk/midnight-sdk#403 ·