feat: Gitea issue body parser for structured task extraction (#90) #177

Closed
Rockachopa wants to merge 2 commits from feat/90-issue-body-parser into main
Owner

Closes #90

Changes

Added scripts/gitea_issue_parser.py — parses Gitea issue markdown bodies into structured JSON.

Extracted Fields

  • title: Issue title
  • context: Background/description section
  • criteria[]: Acceptance criteria (checkboxes or numbered lists)
  • labels[]: Issue labels
  • epic_ref: Parent/epic issue reference (from "Closes #N" or title)
  • sections{}: All ## sections as key-value pairs

Usage

# From file
cat issue_body.txt | python3 scripts/gitea_issue_parser.py --stdin --pretty

# From Gitea API
python3 scripts/gitea_issue_parser.py --url https://forge.../api/v1/repos/.../issues/123 --pretty

# With title/labels
python3 scripts/gitea_issue_parser.py body.txt --title "Fix thing (#42)" --labels pipeline extraction

Tests

python3 scripts/test_gitea_issue_parser.py
Closes #90 ## Changes Added `scripts/gitea_issue_parser.py` — parses Gitea issue markdown bodies into structured JSON. ## Extracted Fields - `title`: Issue title - `context`: Background/description section - `criteria[]`: Acceptance criteria (checkboxes or numbered lists) - `labels[]`: Issue labels - `epic_ref`: Parent/epic issue reference (from "Closes #N" or title) - `sections{}`: All ## sections as key-value pairs ## Usage ```bash # From file cat issue_body.txt | python3 scripts/gitea_issue_parser.py --stdin --pretty # From Gitea API python3 scripts/gitea_issue_parser.py --url https://forge.../api/v1/repos/.../issues/123 --pretty # With title/labels python3 scripts/gitea_issue_parser.py body.txt --title "Fix thing (#42)" --labels pipeline extraction ``` ## Tests ```bash python3 scripts/test_gitea_issue_parser.py ```
Rockachopa added 2 commits 2026-04-15 03:34:35 +00:00
Timmy approved these changes 2026-04-15 04:13:24 +00:00
Dismissed
Timmy left a comment
Owner

Mostly looks good with minor suggestions below.

Scope: 2 file(s) changed (273+ / 0-)

Issues

  • Possible duplicate: This PR appears similar to #183. Consider closing duplicates.
Mostly looks good with minor suggestions below. **Scope**: 2 file(s) changed (273+ / 0-) ### Issues - **Possible duplicate**: This PR appears similar to #183. Consider closing duplicates.
Timmy requested changes 2026-04-15 14:35:38 +00:00
Timmy left a comment
Owner

DUPLICATE of #183: Both PRs implement the same Gitea issue body parser for structured task extraction.

This PR (#177) is the older version with:

The token auth support is the one advantage over #183. If merging #183 instead, cherry-pick the token auth from this PR.

Recommend closing this in favor of #183 which has cleaner code and better type annotations.

**DUPLICATE of #183**: Both PRs implement the same Gitea issue body parser for structured task extraction. This PR (#177) is the older version with: - String epic_ref format ("#42") vs int in #183 - More verbose section parsing loop vs regex in #183 - Token auth support in parse_from_url (good addition not in #183) - Tests use simpler import pattern (sys.path.insert) The token auth support is the one advantage over #183. If merging #183 instead, cherry-pick the token auth from this PR. Recommend closing this in favor of #183 which has cleaner code and better type annotations.
Author
Owner

Closing: unmergeable due to conflicts or branch protection. Reopen if needed.

Closing: unmergeable due to conflicts or branch protection. Reopen if needed.
Rockachopa closed this pull request 2026-04-16 01:53:53 +00:00
Author
Owner

Closing: unmergeable due to conflicts or branch protection. Reopen if needed.

Closing: unmergeable due to conflicts or branch protection. Reopen if needed.
Author
Owner

Closing: unmergeable due to conflicts or branch protection. Reopen if needed.

Closing: unmergeable due to conflicts or branch protection. Reopen if needed.
Rockachopa reopened this pull request 2026-04-16 02:04:09 +00:00
Author
Owner

Superseded by merged PR #183. Closing as content is already in main.

Superseded by merged PR #183. Closing as content is already in main.
Rockachopa closed this pull request 2026-04-16 02:13:36 +00:00
Rockachopa reopened this pull request 2026-04-16 02:42:01 +00:00
Rockachopa closed this pull request 2026-04-16 02:52:40 +00:00

Pull request closed

Sign in to join this conversation.