Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

## Checklist items

<!-- List checklist issue numbers this PR completes -->
<!-- Required: Closes #N drives automation. When this PR opens, Actions checks the
box in APPLICATION.md/README and switches (Issue: …) → (PR: …).
Do not check boxes in this PR or in APPLICATION.md yourself. -->

Closes #

## Application fields updated

<!-- Which field(s) in APPLICATION.md were changed? -->
<!-- Optional for reviewers: list `field_id` headings you edited in APPLICATION.md -->

- [ ] See [APPLICATION.md](../APPLICATION.md) — list field IDs here, e.g. `project_summary`, `maintainers_file`
- `field_id`
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
.env
.env.*
.vscode/
CNCF-SUBMISSION.md
CNCF-SUBMISSION.md
__pycache__/
scripts/__pycache__/
2 changes: 1 addition & 1 deletion APPLICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Single source of truth for the CNCF sandbox application. Each `## field_id` section maps to the [official CNCF application form](https://github.com/cncf/sandbox/blob/main/.github/ISSUE_TEMPLATE/application.yml).

**Work here only:** Each checklist line shows `(Issue: …)` until you open a PR; automation then shows `(PR: …)` in this file and in [README.md](README.md). Edit answers below; do not edit README for application content.
**Work here only:** Each checklist line shows `(Issue: …)` until you open a PR with `Closes #N`; automation then checks the box and shows `(PR: …)` here and in [README.md](README.md). Edit answers below; do not edit README or toggle checklist boxes yourself.

Run `./scripts/generate-submission.sh` when ready to submit to CNCF.

Expand Down
10 changes: 7 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Each section includes:
- A checklist line with `(Issue: [#N](…))` (after bootstrap)
- A **Your answer** area for form content

Pick an issue, edit the relevant section(s) in `APPLICATION.md`, and open a pull request with `Closes #N`. Automation updates the checklist line to `(PR: [#…](…))` in **both** `APPLICATION.md` and [README.md](README.md). **Do not edit README** for answers or tracking.
Pick an issue, edit the relevant section(s) in `APPLICATION.md`, and open a pull request with `Closes #N`. Do **not** manually check the checklist box — automation marks it `[x]` and updates `(PR: …)` in **both** `APPLICATION.md` and [README.md](README.md). **Do not edit README** for answers or tracking.

Progress lives in README only; it updates when checklist boxes are checked after issues close.

Expand All @@ -42,9 +42,13 @@ When the PR merges to the default branch, GitHub closes the linked issue automat

### 4. Checklist sync

The [sync-checklist-pr workflow](.github/workflows/sync-checklist-pr.yml) runs when you open or update a PR with `Closes #N`, replacing `(Issue: …)` with `(PR: …)` in `APPLICATION.md` and README (on your PR branch).
The [sync-checklist-pr workflow](.github/workflows/sync-checklist-pr.yml) runs when you open or update a PR with `Closes #N`. On your PR branch it:

The [sync-checklist workflow](.github/workflows/sync-checklist.yml) runs when a checklist issue is closed. It checks the box in `APPLICATION.md`, refreshes the README dashboard and progress bar, and **commits directly to `main`** (no follow-up bot PR).
1. Replaces `(Issue: …)` with `(PR: …)`
2. Checks the box (`[x]`) in `APPLICATION.md`
3. Mirrors those lines and refreshes progress in README

The [sync-checklist workflow](.github/workflows/sync-checklist.yml) is a fallback when a checklist issue is closed (e.g. if the PR link step did not run). It checks the box on `main` if needed.

### 5. Submit to CNCF

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow.

| Stage | Checklist line shows |
| --- | --- |
| After bootstrap | `(Issue: [#N](…))` — open GitHub issue |
| After you open a PR with `Closes #N` | `(PR: [#N](…))` — in APPLICATION.md and this README |
| After the PR merges | Checkbox `[x]`; issue closes |
| After bootstrap | `- [ ] … (Issue: [#N](…))` |
| After you open a PR with `Closes #N` | `- [x] … (PR: [#M](…))` in APPLICATION.md and this README |
| After the PR merges | Issue closes; progress on `main` matches |

## Application progress

Expand All @@ -52,7 +52,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow.

## Application checklist

Each row links to the matching section in [APPLICATION.md](APPLICATION.md). `(Issue: …)` becomes `(PR: …)` when you open a pull request with `Closes #N`.
Each row links to the matching section in [APPLICATION.md](APPLICATION.md). A PR with `Closes #N` checks the box and switches `(Issue: …)` to `(PR: …)` automatically — do not edit these lines by hand.

<!-- application-dashboard:start -->
### [Read Prerequisites](APPLICATION.md#read_prerequisites)
Expand Down
10 changes: 6 additions & 4 deletions scripts/checklist_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,20 @@ def update_files_for_pr(root: Path, repo: str, pr_number: int, issue_numbers: Li
registry_path = root / ".github" / "issue-registry.json"
registry = load_issue_registry(registry_path)
application_path = root / "APPLICATION.md"
readme_path = root / "README.md"
application = application_path.read_text(encoding="utf-8")
before = application_path.read_text(encoding="utf-8")
application = before
changed_slugs: List[str] = []

for issue_number in issue_numbers:
slug = slug_for_issue(registry, issue_number)
if not slug:
continue
# Closes #N is enough: swap Issue→PR and check the box. README mirrors APPLICATION.md.
application = apply_pr_link(application, slug, pr_number, repo)
application = mark_checkbox_complete(application, slug)
changed_slugs.append(slug)

if not changed_slugs:
if not changed_slugs or application == before:
return False, []

application_path.write_text(application, encoding="utf-8")
Expand Down Expand Up @@ -237,7 +239,7 @@ def main() -> int:
if not changed:
print("No checklist lines updated for PR", file=sys.stderr)
return 0
print(f"Updated PR links for: {', '.join(slugs)}")
print(f"Updated PR links and checked boxes for: {', '.join(slugs)}")
return 0

if args.command == "sync-readme":
Expand Down
2 changes: 1 addition & 1 deletion scripts/render_application_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def render() -> str:
"",
"Single source of truth for the CNCF sandbox application. Each `## field_id` section maps to the [official CNCF application form](https://github.com/cncf/sandbox/blob/main/.github/ISSUE_TEMPLATE/application.yml).",
"",
"**Work here only:** Each checklist line shows `(Issue: …)` until you open a PR; automation then shows `(PR: …)` in this file and in [README.md](README.md). Edit answers below; do not edit README for application content.",
"**Work here only:** Each checklist line shows `(Issue: …)` until you open a PR with `Closes #N`; automation then checks the box and shows `(PR: …)` here and in [README.md](README.md). Edit answers below; do not edit README or toggle checklist boxes yourself.",
"",
"Run `./scripts/generate-submission.sh` when ready to submit to CNCF.",
"",
Expand Down
Loading