Skip to content

Commit ca3a3bf

Browse files
hhkaosclaude
andcommitted
Add propose-event issue form and thin issue-to-pr workflow
The issue form carries the ote-event label (a labels= URL param only applies with triage permission, which proposers don't have). The workflow filters by label at job level — on: issues can't — and also listens to pull_request closed so the reusable workflow can delete ote/* branches after merge. All logic stays in ote-tools. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5ed2b01 commit ca3a3bf

3 files changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Issue form used by the OTE editor's "propose change" flow. The editor
2+
# prefills this template via URL params; the `ote-event` label below is what
3+
# triggers the issue-to-pr workflow. The label must come from the template:
4+
# a `labels=` URL param only applies if the issue author has triage
5+
# permission on the repo, which event proposers normally don't.
6+
name: Propose an event
7+
description: Propose a new event or a change to an existing one. Prefer the editor linked from the dashboard — it fills this form for you.
8+
labels: [ote-event]
9+
body:
10+
- type: textarea
11+
id: event-json
12+
attributes:
13+
label: Event JSON
14+
description: The full OTE event document. The editor generates this — you rarely need to write it by hand.
15+
render: json
16+
validations:
17+
required: true

.github/workflows/issue-to-pr.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Turns an `ote-event` issue (opened by the OTE editor) into a pull request,
2+
# and cleans up the `ote/*` branch after the PR is merged (the pull_request
3+
# closed event). All logic lives in OpenTechEvents/ote-tools — this file only
4+
# calls it. @main will become @v1 once the reusable workflows stabilise.
5+
name: Issue to PR
6+
on:
7+
issues:
8+
types: [opened, edited]
9+
pull_request:
10+
types: [closed]
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
jobs:
16+
issue-to-pr:
17+
# `on: issues` can't filter by label, so the label check lives here.
18+
if: github.event_name == 'pull_request' || contains(github.event.issue.labels.*.name, 'ote-event')
19+
uses: OpenTechEvents/ote-tools/.github/workflows/issue-to-pr.yml@main

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ request, so mistakes can't reach your published feed. The **editor** linked
127127
from your dashboard (create/edit events via a form, proposed as a PR to your
128128
repo) is coming in phase 2.
129129

130+
**Propose an event without touching JSON**: anyone can fill in the
131+
[OTE editor](https://tools.opentechevents.org/editor?repo=your-user/your-repo)
132+
(replace `your-user/your-repo` with your fork, or just follow the link from
133+
your dashboard). It generates the event JSON and opens a prefilled issue in
134+
your repo; a workflow validates it and turns it into a pull request for you
135+
to review and merge. No git, no JSON editing, no write access needed.
136+
130137
## Updates
131138

132139
The thin workflows track `OpenTechEvents/ote-tools@main` (pinned to `@v1` once

0 commit comments

Comments
 (0)