forked from thoughtworks/HeartBeat
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADM-715[docs]refactor: put branch in request body (#950)
- Loading branch information
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,17 +115,23 @@ end | |
Triggered when the user selects a branch in the Pipeline settings module of the Metrics page. | ||
|
||
- Api Design | ||
|
||
``` | ||
paths: /api/v1/source-control/{sourceType}/repos/branches/{branch}/verify | ||
paths: /api/v1/source-control/{sourceType}/repos/branches/verify | ||
method: post | ||
request: { | ||
repository: "[email protected]:XXXX/XXXX.git", | ||
token: "..." | ||
token: "...", | ||
branch: "main" | ||
} | ||
responses: | ||
Status Code: 204 | ||
``` | ||
|
||
Note:Since the branch name may contain special characters, which will cause the URL to be unsafe, put it in the request body. | ||
|
||
- GitHub Api for verification | ||
|
||
``` | ||
paths: https://api.github.com/repos/{owner}/{repo}/branches/{branch} | ||
method: get | ||
|