Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[workshop-sync] side-quest-13-01-pr-labeler-pattern.md: invalid add-labels schema and disallowed write permission

クローズ 初心者向け
#4,045 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
92/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, markdown, yaml
領域
documentation

調査の方向性

workshop/side-quest-13-01-pr-labeler-pattern.md を開き、.github/workflows/pr-labeler.md の frontmatter の例を確認します。説明に従って無効な add-labels フィールドを置き換え、許可されていない書き込み権限を削除してから、strict mode で gh aw compile --validate を実行します。例がエラーや警告なしでコンパイルされれば完了です。

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

説明

documentation

Workshop file reviewed

workshop/side-quest-13-01-pr-labeler-pattern.md

Problem

The example workflow frontmatter in this file fails to compile with the current gh-aw CLI (v0.89.21) for two reasons:

  1. Invalid add-labels field limit:

    safe-outputs:
      add-labels:
        limit: 5
    

    Compiling this with gh aw compile --validate produces:

    error: Unknown property: limit. Valid fields are: allowed, allowed-repos, blocked, create-if-missing, github-app, github-token, issue-intent, issues, max, pull-requests, ...
    
  2. Disallowed write permission alongside safe-outputs:

    permissions:
      pull-requests: write
      contents: read
    

    Compiling in strict mode (the workshop's default/recommended mode) produces:

    error: strict mode: write permission 'pull-requests: write' is not allowed for security reasons. Use 'safe-outputs.create-issue', 'safe-outputs.create-pull-request', 'safe-outputs.add-comment', or 'safe-outputs.update-issue' to perform write operations safely.
    

Both errors were reproduced directly by compiling the exact snippet from the file with gh aw compile --validate.

Current correct syntax

  • The add-labels safe output uses the field max, not limit, to cap the number of labels applied.
  • permissions: should not declare pull-requests: write when safe-outputs.add-labels is used — safe-outputs performs the write on the agent's behalf and only read-level permissions are needed in the job. See https://github.github.com/gh-aw/reference/safe-outputs/

A corrected frontmatter block:

---
name: PR Labeler
on:
  pull_request:
    types: [opened, synchronize]
permissions:
  contents: read
safe-outputs:
  add-labels:
    max: 5
---

This was verified to compile successfully with gh aw compile --validate (no errors or warnings).

Suggested fix

In the .github/workflows/pr-labeler.md example inside the workshop file:

  • Replace limit: 5 with max: 5 under safe-outputs.add-labels.
  • Remove pull-requests: write from the permissions: block, keeping only contents: read.

Generated by 🔍 Workshop Sync Check · copilot · auto · 204.5 AIC · ⌖ 6.8 AIC · ⊞ 9.2K · ◷

  • expires on Oct 2, 2026, 8:58 AM UTC
主要言語
JavaScript
スター
53
フォーク
35
平均マージ
1日 6時間
マージ済み PR(30日)
15

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

githubnext/gh-aw-workshop のほかの issue

githubnext/gh-aw-workshop の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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