Skip to content

Commit 21b4c4c

Browse files
committed
Add duplicate discussion check before creating new ones
1 parent dee8403 commit 21b4c4c

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

.github/workflows/copa-feature-sync.lock.yml

Lines changed: 18 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/copa-feature-sync.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
schedule:
55
- cron: "0 6 * * *"
66
workflow_dispatch:
7+
pull_request:
8+
types: [labeled]
79
discussion:
810
types: [labeled]
911
permissions:
@@ -136,9 +138,10 @@ Add or update feature entries under `releases[tag_name].features` so each includ
136138
2. Sort all releases chronologically (oldest first, starting from v0.6.0)
137139
3. Find the FIRST release where `releases[tag_name].discussion_url` does not exist in the state file
138140
4. **If ALL releases already have discussions**: emit `noop` with message "All releases up to vX.Y.Z have discussions" and EXIT
139-
5. For the target release, analyze what features need to be added to copa-action
140-
6. Create a discussion with title `Copa Feature Sync - <tag>` (e.g., `Copa Feature Sync - v0.6.0`)
141-
7. **STOP IMMEDIATELY** after creating the discussion - do NOT proceed to Phase 2
141+
5. **DUPLICATE CHECK (IMPORTANT)**: Before creating a discussion, search GitHub discussions for an existing discussion with title "Copa Feature Sync - <tag>". If one already exists, update the state file with its URL and emit `noop` - do NOT create a duplicate.
142+
6. For the target release, analyze what features need to be added to copa-action
143+
7. Create a discussion with title `Copa Feature Sync - <tag>` (e.g., `Copa Feature Sync - v0.6.0`)
144+
8. **STOP IMMEDIATELY** after creating the discussion - do NOT proceed to Phase 2
142145

143146
**Discussion Body Must Include**:
144147
- **Release Overview**: Tag, date, link to release notes

0 commit comments

Comments
 (0)