Check that pull requests follow the pull request template
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 58/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github-actions, javascript
調査の方向性
Start with scripts/sync-automation-template.js, automation-registry.yml, and the generated automation-group-pull-request-target.yml; compare the existing changelog.yml check and read docs/testing-automations.md. Test the changes in test-actions, including template-sync behavior and pull requests with missing, placeholder, valid, edited, and bot-authored bodies. Done means generated files are current and all acceptance criteria pass.
索引モデルが issue の本文から書いたものです。
説明
Overview
Contributors open pull requests that do not follow the pull request template. Reviewers then ask
for the missing information by hand.
Make the template reachable in every consumer repo, and check it through the automation entry point.
The check fails the run when the body does not follow the template.
Complexity: Medium
Target branch: main
Context
A sample of the most recent pull requests from non-members shows three separate failures:
| Repo | Sampled | No template sections | ## AI usage missing |
… placeholders left |
|---|---|---|---|---|
kolibri |
8 | 3 | 1 | 1 |
studio |
12 | 2 | 2 | 3 |
kolibri-design-system |
6 | 0 | 0 | 0 |
The template is not one check. A body can carry the headings and still leave ## AI usage empty,
which the template marks as required.
kolibri-design-system is the outlier, and the reason is where the file sits. It holds its own
template at .github/pull_request_template.md. morango and test-actions hold their own too.
kolibri, studio, le-utils, kolibri-app and kolibri-installer-android hold none, so they
fall back to the org default in this repo at .github/PULL_REQUEST_TEMPLATE.md.
GitHub applies an org default in the web form. A pull request opened with gh pr create, the REST
API, or a coding agent reads the working copy instead, and the org file is not in the working copy.
A contributor in a kolibri checkout therefore has no template to follow.
kolibri-design-system already enforces one section in .github/workflows/changelog.yml. It reads
the body, fails the job when the section is absent or still the placeholder text, and exempts
dependabot[bot]. It is the model for the check here.
The Change
Put the template in the checkout. Extend scripts/sync-automation-template.js so it carries
PULL_REQUEST_TEMPLATE.md to consumers alongside automation-template.yml. Skip any repo that
holds its own template. This prevents the failure rather than reporting it, because the file then
sits where every tool looks for it.
Add a pull-request-template automation. Add an entry to automation-registry.yml with a leaf
that reads github.event.pull_request.body. The leaf resolves the template the same way GitHub
does, repo copy first and org default second, then takes the required sections from it. The
generator places the job in automation-group-pull-request-target.yml.
The check reports three things:
- A required section heading is absent.
- A required section holds no text.
- A section still holds the
…placeholder.
Fail the run. The job exits non-zero, as changelog.yml does.
The job log is the only channel, so it must name every missing section rather than fail on the
first one.
Notes for the implementer
Trigger on pull_request_target types opened, edited and reopened, so a corrected body clears
the check. The template on: block currently carries labeled, opened and review_requested, so
edited and reopened are new. Every consumer needs the widened template, which the sync workflow
proposes on its next run.
Exempt bot authors, as changelog.yml does.
Out of Scope
- Changing the wording of the template.
- Posting a comment on the pull request. The failed check is the only report.
- Making the check required in branch protection. That is a repo setting, and it follows once the
check runs clean. - Changing the
kolibri-design-systemchangelog check.
Acceptance Criteria
- The sync workflow proposes
PULL_REQUEST_TEMPLATE.mdto consumers without their own copy, and
skipskolibri-design-system,morangoandtest-actions. -
automation-registry.ymlholds apull-request-templateentry, and the generated files are
up to date. - A body with no template sections fails the run.
- A body with the sections but an empty
## AI usagefails the run. - A body that still holds
…fails the run. - The log of a failed run names every missing section, not only the first.
- A body that follows the template passes.
- Editing a bad body to a good one turns the check green.
- Bot authors pass.
- The check reads the repo template in a repo that holds one, and the org default elsewhere.
Testing
Test in test-actions. See
testing the automations.
The contributor cases need an account outside the organization.
- Open a pull request with an empty body. Expect a failed check that names every missing section.
- Edit the body to follow the template. Expect the check to pass.
- Open a pull request that follows the template. Expect a passing check.
- Dispatch the sync workflow with
only: test-actionsanddry_run. Expect no template row,
becausetest-actionsholds its own copy.
References
- #97 added the sync workflow.
- #98 made
test-actionsthe place to test. - #101 grouped automation jobs by trigger event.
AI usage
I used Claude Code to sample recent contributor pull requests, to check which repos hold their own
template, and to read the kolibri-design-system changelog check. I decided the approach and
verified the findings against the repos.
- 主要言語
- JavaScript
- スター
- 1
- フォーク
- 7
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
learningequality/.github のほかの issue
-
Set up GitHub Discussions as the entry point for unplanned work対応中かも @akolson が今日担当しました。 オープン
learningequality/.github#105 · 担当者 1 名 ·
-
github_actions
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
learningequality/.github#104 ·
-
dependencies github_actions
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
learningequality/.github#100 ·
-
Create process for unplanned work and automate PR handling based on linked issue assignment再び着手できるかも @akolson が 180 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンgithub_actions
learningequality/.github#67 · コメント 1 件 · 担当者 1 名 ·
learningequality/.github の issue をすべて見る
似ている issue
-
automation models
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
needs:triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
enhancement status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
mastra-ai/mastra#25508 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
githubnext/gh-aw-cao#15017 ·
メンテナーはふだん 1 日以内に返信