Feature request: Add support for locking actions that use YAML anchors

オープン
#252 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
github-actions, go, yaml
領域
cli

調査の方向性

The payload names no source files, so start by finding where the tool reads uses: values from workflow YAML and how it parses those documents. Reproduce with the anchored Checkout example in the issue and see whether the anchor-aliased uses: line is skipped. Done means the aliased step is detected and locked, and the expected output in the issue is confirmed with the maintainers first, since it replaces the commit SHA with a tag.

索引モデルが issue の本文から書いたものです。

説明

Current versions of actions-lock (as of v0.4.0) fail to detect and lock actions that use YAML anchors in the uses: field.

For example, the following configuration containing YAML anchors remains unhandled:

# `gh actions-lock` does not handle `uses:` that use YAML anchors
- name: Checkout
  uses: &checkout-uses actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  with: &checkout-with
    token: ...
    persist-credentials: ...

# Run the same action again using the same version and the same parameters
- name: Checkout again
  uses: *checkout-uses
  with: *checkout-with

Proposed Feature

Implementation of YAML anchor parsing enables actions-lock to correctly detect and process these actions as lock targets.

The expected behavior involves processing such configurations as follows:

  - name: Checkout
-   uses: &checkout-uses actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+   uses: &checkout-uses actions/[email protected]
    with: &checkout-with
      token: ...
      persist-credentials: ...

  - name: Checkout again
    uses: *checkout-uses
    with: *checkout-with
主要言語
Go
スター
295
フォーク
21
平均マージ
1日 3時間
マージ済み PR(30日)
64

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/gh-actions-lock のほかの issue

github/gh-actions-lock の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。