- Explore the Pull Request REST API
- Test
curlcalls in Swagger UI - Integrate the command into a
Jenkinsfile - Enforce branch protection and sync with Argo CD
Exploring the Pull Request REST API
Most Git hosting platforms expose a REST API for every UI action. To create a pull request via API:- Navigate to your repository in the web UI.
- Open the embedded API (Swagger) documentation.
- Locate Pulls (GitHub) or Pull Requests (Gitea) under Repository.

Creating a Pull Request via Swagger UI
Search forpull and expand the POST /repos/{owner}/{repo}/pulls endpoint to view required parameters: owner, repo, head, base, title, etc.

- owner:
dasher-org - repo:
solar-system-gitops-argocd - head: feature branch (e.g.,
feature-123) - base:
main - title, body, assignees, labels

Request Body Schema
curl command:
- 404 Not Found: Verify the URL,
owner, andreponames. - 401 Unauthorized: Provide a valid API token prefixed with
token.
Integrating into a Jenkins Pipeline
Add the validatedcurl call to your Jenkinsfile. Store GITEA_TOKEN in Jenkins Credentials:
when { branch 'PR*' } condition runs this stage only on branches matching PR*. After you push, Jenkins will auto-create a PR:

Enforcing Branch Protection
To require successful Jenkins builds before merging:Activating branch protection prevents direct pushes and enforces CI gates before merges.

Verifying the Pull Request and Merge
Review and merge your PR intomain:


Accessing the Application
After sync completes, list Kubernetes resources:Inspecting the Sealed Secret
Bitnami Sealed Secrets decrypts your sealed YAML into a regularSecret: