Skip to content

feat(code-governance): add closePR method for PR cleanup#44

Merged
saurabhjain1592 merged 10 commits into
mainfrom
feat/close-pr-948
Jan 8, 2026
Merged

feat(code-governance): add closePR method for PR cleanup#44
saurabhjain1592 merged 10 commits into
mainfrom
feat/close-pr-948

Conversation

@saurabhjain1592

Copy link
Copy Markdown
Member

Summary

  • Add closePR() method to close PRs without merging
  • Optional deleteBranch parameter to also remove source branch
  • Add closedAt field to PRRecord type
  • Update tests for new constructor parameter

Enterprise Feature

This is an enterprise feature that requires portal authentication. Supports all Git providers: GitHub, GitLab, Bitbucket.

Related

  • Enterprise PR #948 - Portal ClosePR endpoint

- Add closePR() method to close PRs without merging
- Optional deleteBranch parameter to also remove source branch
- Add closedAt field to PRRecord type
- Update tests for new constructor parameter

Enterprise feature requiring portal authentication.
Fixed endpoint path from /api/v1/orchestrator/plan/{id} to /api/v1/plan/{id}
to match agent proxy routes.
- Update addAuthHeaders() to use OAuth2 Basic auth format
- Uses Authorization: Basic base64(clientId:clientSecret) header
- Remove non-standard X-Client-ID and X-Client-Secret headers
- X-License-Key retained as fallback for backward compatibility
- Add comprehensive tests for OAuth2 Basic auth
- Update CHANGELOG with authentication changes
- Remove licenseKey field from AxonFlowConfig
- Remove X-License-Key header support
- Simplify addAuthHeaders() to only use OAuth2 Basic auth
- Update all tests to check for Authorization: Basic header
- Update javadoc examples to use clientId/clientSecret
- Update README and CHANGELOG with breaking changes

Breaking Changes:
- licenseKey config option removed
- X-License-Key header no longer sent
- clientId and clientSecret are now required for enterprise features
- Update version to 3.0.0 in Maven and Gradle examples
- Replace AXONFLOW_LICENSE_KEY with CLIENT_ID/CLIENT_SECRET env vars
- Update error handling comment to reference credentials
clientId is now the only required credential for features requiring auth.
clientSecret remains optional for community/self-hosted deployments
but is still validated server-side for enterprise mode.

Part of OAuth2 migration - PR #948
In community mode without OAuth2, userToken is used for audit/tracking
purposes only. If null or empty, SDK now defaults to 'anonymous' so
callers don't need to handle the fallback themselves.

- Added default handling in ClientRequest constructor
- OAuth2-style auth is additive, not breaking (clientId/clientSecret optional)
- Removes breaking change framing for minor version bump
@saurabhjain1592 saurabhjain1592 merged commit d844e39 into main Jan 8, 2026
9 checks passed
@saurabhjain1592 saurabhjain1592 deleted the feat/close-pr-948 branch January 11, 2026 20:59
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