Skip to content

fix(pull-requests): require affirmative Gitea action metadata - #16

Open
kalvenschraut wants to merge 1 commit into
gitea/revertfrom
gitea/access-guards
Open

fix(pull-requests): require affirmative Gitea action metadata#16
kalvenschraut wants to merge 1 commit into
gitea/revertfrom
gitea/access-guards

Conversation

@kalvenschraut

@kalvenschraut kalvenschraut commented Sep 5, 2026

Copy link
Copy Markdown
Member

Incomplete Gitea repository responses no longer advertise write access or enabled merge/update methods without affirmative metadata. A PR whose head revision is unavailable can still open its detail without requesting an invalid commit-status URL.

Focused regression cases cover incomplete repository metadata and a missing head revision. Final integrated server typecheck and targeted lint pass.

Final stack validation at 256fd6fe5: 228 focused tests passed, followed by 61 API/workflow cases and the final team-recovery regression; server typecheck and targeted lint passed. The live settle-on-merge E2E previously passed with fixture cleanup. Companion Gitea backend and focused integration tests passed, including native revert across all five merge styles.

Model: GPT-6 Astra. Harness: Codex.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected repository access reporting when permission and capability details are unavailable.
    • Prevented merge and update actions from being enabled by default when support cannot be confirmed.
    • Avoided status checks for blank commit revisions, returning no check results instead.
    • Improved auto-merge timeline fallback handling.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 8ef799cd-379d-4421-aa2f-088d8eeb1c95

📥 Commits

Reviewing files that changed from the base of the PR and between 10005f8 and dfd06ae.

📒 Files selected for processing (2)
  • apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
  • apps/server/src/pullRequest/GiteaPullRequestApi.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e39f4d82-0df0-4818-b9a3-918a3fafe9c8

📥 Commits

Reviewing files that changed from the base of the PR and between b70a0f9 and 9256637.

📒 Files selected for processing (2)
  • apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
  • apps/server/src/pullRequest/GiteaPullRequestApi.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The Gitea pull-request API now requires explicit repository permissions for access capabilities and returns no checks for blank commit revisions without making a request.

Changes

Gitea API validation

Layer / File(s) Summary
Repository access capabilities
apps/server/src/pullRequest/GiteaPullRequestApi.ts, apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
Repository access reports write, merge, rebase, and update capabilities only when the corresponding permissions are explicit. Tests cover incomplete repository settings.
Blank revision check handling
apps/server/src/pullRequest/GiteaPullRequestApi.ts, apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
listChecks returns an empty list and skips the request when the commit revision is blank.
Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 92566

Gitea pull requests now expose write and merge actions only when affirmative metadata is available, and missing head revisions no longer trigger invalid status requests. The changed behaviors are covered by focused regression tests and present no remaining merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: Gitea action metadata must be affirmative before access or methods are advertised.
Description check ✅ Passed The description explains the changes, the problem, the regression coverage, and validation results. It omits the template headings and checklist, but the required information is mostly present and UI …
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gitea/access-guards

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

@kalvenschraut
kalvenschraut marked this pull request as ready for review September 5, 2026 05:57
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please review this PR at its exact current head in stack pingdotgg#6. Verify correctness, regressions, security boundaries, and focused coverage against its current base, and report any actionable findings with file references.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

@kalvenschraut I will perform a full review of PR #16 at its current head in stack #6. I will check correctness, regressions, security boundaries, and focused test coverage against the current base.

⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 2 minutes.

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.

1 participant