From f8054f9eae98cd14b9eb13365ad8d9423921c50f Mon Sep 17 00:00:00 2001 From: junbo dai Date: Wed, 17 Jan 2024 11:17:10 +0800 Subject: [PATCH] ADM-715[docs]refactor: put branch in request body (#950) --- .../tech-spikes-split-verification-of-github.mdx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/src/content/docs/en/spikes/tech-spikes-split-verification-of-github.mdx b/docs/src/content/docs/en/spikes/tech-spikes-split-verification-of-github.mdx index 41c569be8f..53e9ce0223 100644 --- a/docs/src/content/docs/en/spikes/tech-spikes-split-verification-of-github.mdx +++ b/docs/src/content/docs/en/spikes/tech-spikes-split-verification-of-github.mdx @@ -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: "git@github.com: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