CI: dotnet.yml expands GitVersion outputs directly into bash run scripts
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
.github/workflows/dotnet.ymlを読み、GitVersionの処理方法を.github/workflows/aot.ymlと比較してください。issueによると、後者ではすでにより安全なパターンが使われています。指定された2つのステップを更新し、ステップレベルのenv:を通じてoutputsを渡してシェル変数を使うようにしてください。説明にあるとおり、Buildステップの重複した-p:引数を削除してください。両方のスクリプトでGitVersionのoutputsをシェルソースに補間せず、workflowが引き続き同じバージョン値をエクスポートしてビルドできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What: .github/workflows/dotnet.yml interpolates GitVersion outputs straight into shell source with ${{ steps.gitversion.outputs.* }}, in two places:
- the "Export version env vars" step (
echo "InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }}"and four siblings) - the "Build" step (
"-p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }}"and four siblings)
InformationalVersion carries branch-derived metadata. workflow_dispatch lets a user pick the branch, and GitVersion only replaces / with - in it, so a branch name containing $(...) would run as command substitution in the runner shell. Only users with write access can dispatch, so the risk is low, but the fix is cheap.
Where found: CodeRabbit flagged the same pattern in the new .github/workflows/aot.yml on PR #7226, which fixed it there (commit 00bb8b0fc8). dotnet.yml was left alone to keep that PR in scope.
Expected: pass the outputs through step-level env: and reference them as $VAR in the scripts, as aot.yml now does. The Build step can drop its -p: arguments entirely, because the export step already puts the same values in GITHUB_ENV and MSBuild binds them as global properties.
- 主要言語
- C#
- スター
- 4k
- フォーク
- 139
- 平均マージ
- 7時間 16分
- マージ済み PR(30日)
- 355
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
thomhurst/TUnit のほかの issue
-
Assert.That on a null non-generic IEnumerable throws ArgumentNullException, so IsNull() cannot passオープンbug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug P3
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
thomhurst/TUnit#7585 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Mock and core generator test restores report vulnerable System.Security.Cryptography.Pkcs versionsオープンdependencies P2
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
thomhurst/TUnit#7412 · コメント 8 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement P3 performance
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
thomhurst/TUnit#7380 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
benchmarks enhancement P3 performance
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
thomhurst/TUnit#7683 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
thomhurst/TUnit の issue をすべて見る
似ている issue
-
area/automation area/sdk kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
unoplatform/uno.templates#2406 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend ui
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
documentation trivial
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[辞書] 同梱辞書追加オープン提案 辞書
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
yksr-melt/Meltype#1651 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信