Skip to content

feat: forgejo issue write ops — create with labels, comment, comments, close zombie check (#16) - #21

Merged
four-bytes-robby merged 2 commits into
mainfrom
feat/16-forgejo-issue-write-ops
Oct 1, 2026
Merged

four-bytes-robby merged 2 commits into
mainfrom
feat/16-forgejo-issue-write-ops

Conversation

@four-bytes-robby

Copy link
Copy Markdown
Member

Closes #16 · replaces #19 (closed when its stacked base was deleted)

  • forgejo_issue_create: label names → ids (repo + org) before POST; unknown label aborts, nothing created
  • forgejo_issue_comment / forgejo_issue_comments (one line per comment, newest N)
  • forgejo_issue_close: comment arg now optional; reports PRs referencing the issue
  • fix (found in wave): getForgejoRepo parsed https remotes as host/owner/repo — every forgejo_* tool failed on https origins; replaced by repoFromRemoteUrl
  • 22 → 25 tools, README/AGENTS updated, 0.3.0

Gates: tsc clean · 279 tests pass · build ok · local review 95% (after fix commit 57e76ef: no partial pages, org-label errors surface, zombie scan 500 PRs, error-path tests)


Summary by cubic

Adds Forgejo issue write tools — create with labels, comment, and list comments — plus a zombie check on close, and fixes the remote parsing bug that broke every forgejo_* tool on https origins.

  • forgejo_issue_create resolves label names against repo and org labels before POSTing; unknown labels abort with nothing created.
  • forgejo_issue_comments shows one line per comment with newest N; forgejo_issue_close makes the comment optional and reports linked PRs referencing the issue (scans the 500 most recently updated).
  • repoFromRemoteUrl handles https, ssh, scp-style, and subpath remotes. Pagination and label failures now surface: a failed page fails the whole list call, and only a 404 on org labels counts as "no org".

Written for commit 57e76ef. Summary will update on new commits.

Review in cubic

…, close zombie check #16

- forgejo_issue_create: label names → ids (repo + org) before POST; unknown
  label aborts, nothing created
- forgejo_issue_comment / forgejo_issue_comments (one line per comment)
- forgejo_issue_close: comment now optional; reports PRs referencing the issue
- fix: getForgejoRepo parsed https remotes as host/owner/repo — every forgejo_*
  tool failed on https origins; now repoFromRemoteUrl (https, ssh, scp, subpath)
- forgejoApiAll pagination helper; shared fetch-mock test helpers
- Tool count 22 → 25, docs updated, 0.3.0
…mbie scan 500 PRs #16

- forgejoApiAll: a failed later page fails the call instead of returning a
  partial list that looks complete
- resolveLabelIds: only a 404 on org labels means "no org"; other failures
  are reported instead of calling org labels unknown
- forgejo_issue_close: zombie check scans 500 PRs and says so when none match
- tests: pagination, failed page, org-label errors, API error paths,
  comment-then-close, not-configured for every new tool
@four-bytes-robby four-bytes-robby self-assigned this Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4b9fb48c-8cb0-400b-8026-b74640535593

📥 Commits

Reviewing files that changed from the base of the PR and between 91413b5 and 955244b.

📒 Files selected for processing (11)
  • AGENTS.md
  • README.md
  • package.json
  • src/four-opencode-git.ts
  • src/lib/forgejo-utils.ts
  • src/tools/forgejo-issue-close.ts
  • src/tools/forgejo-issue-comment.ts
  • src/tools/forgejo-issue-comments.ts
  • src/tools/forgejo-issue-create.ts
  • tests/forgejo-helpers.ts
  • tests/forgejo-issue-write.test.ts
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@four-bytes-robby
four-bytes-robby merged commit 18c1be2 into main Oct 1, 2026
2 of 3 checks passed
@four-bytes-robby
four-bytes-robby deleted the feat/16-forgejo-issue-write-ops branch October 1, 2026 12:23
four-bytes-robby added a commit that referenced this pull request Oct 1, 2026
…, close zombie check (#16) (#21)

* feat: forgejo issue write ops — create with labels, comment, comments, close zombie check #16

- forgejo_issue_create: label names → ids (repo + org) before POST; unknown
  label aborts, nothing created
- forgejo_issue_comment / forgejo_issue_comments (one line per comment)
- forgejo_issue_close: comment now optional; reports PRs referencing the issue
- fix: getForgejoRepo parsed https remotes as host/owner/repo — every forgejo_*
  tool failed on https origins; now repoFromRemoteUrl (https, ssh, scp, subpath)
- forgejoApiAll pagination helper; shared fetch-mock test helpers
- Tool count 22 → 25, docs updated, 0.3.0

* fix: review findings — no partial pages, org-label errors surface, zombie scan 500 PRs #16

- forgejoApiAll: a failed later page fails the call instead of returning a
  partial list that looks complete
- resolveLabelIds: only a 404 on org labels means "no org"; other failures
  are reported instead of calling org labels unknown
- forgejo_issue_close: zombie check scans 500 PRs and says so when none match
- tests: pagination, failed page, org-label errors, API error paths,
  comment-then-close, not-configured for every new tool
four-bytes-robby added a commit that referenced this pull request Oct 5, 2026
…, close zombie check (#16) (#21)

* feat: forgejo issue write ops — create with labels, comment, comments, close zombie check #16

- forgejo_issue_create: label names → ids (repo + org) before POST; unknown
  label aborts, nothing created
- forgejo_issue_comment / forgejo_issue_comments (one line per comment)
- forgejo_issue_close: comment now optional; reports PRs referencing the issue
- fix: getForgejoRepo parsed https remotes as host/owner/repo — every forgejo_*
  tool failed on https origins; now repoFromRemoteUrl (https, ssh, scp, subpath)
- forgejoApiAll pagination helper; shared fetch-mock test helpers
- Tool count 22 → 25, docs updated, 0.3.0

* fix: review findings — no partial pages, org-label errors surface, zombie scan 500 PRs #16

- forgejoApiAll: a failed later page fails the call instead of returning a
  partial list that looks complete
- resolveLabelIds: only a 404 on org labels means "no org"; other failures
  are reported instead of calling org labels unknown
- forgejo_issue_close: zombie check scans 500 PRs and says so when none match
- tests: pagination, failed page, org-label errors, API error paths,
  comment-then-close, not-configured for every new tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] forgejo issue write ops — create (with labels), comment, comments, close zombie check

1 participant