This is an automated email from the ASF dual-hosted git repository. mintsweet pushed a commit to branch feat-update-webhook in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 27d078532e738b72bedd73270e8728b10c5d486a Author: mintsweet <[email protected]> AuthorDate: Fri May 17 17:13:36 2024 +1200 feat: update post deployment curl for webhook --- .../plugins/register/webhook/components/create-dialog.tsx | 14 ++++++-------- .../plugins/register/webhook/components/view-dialog.tsx | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/config-ui/src/plugins/register/webhook/components/create-dialog.tsx b/config-ui/src/plugins/register/webhook/components/create-dialog.tsx index d293508f7..3f3c9ca58 100644 --- a/config-ui/src/plugins/register/webhook/components/create-dialog.tsx +++ b/config-ui/src/plugins/register/webhook/components/create-dialog.tsx @@ -86,14 +86,12 @@ export const CreateDialog = ({ open, onCancel, onSubmitAfter }: Props) => { }'`, closeIssuesEndpoint: `curl ${prefix}${res.closeIssuesEndpoint} -X 'POST' -H 'Authorization: Bearer ${res.apiKey}'`, postDeploymentsCurl: `curl ${prefix}${res.postPipelineDeployTaskEndpoint} -X 'POST' -H 'Authorization: Bearer ${res.apiKey}' -d '{ - "deployment_commits":[ - { - "commit_sha":"the sha of deployment commit1", - "repo_url":"the repo URL of the deployment commit" - } - ], - "start_time":"Optional, eg. 2020-01-01T12:00:00+00:00" -}'`, + "pipeline_id": "Required. This will be the unique id of the deployment", + "repo_url":"e.g. GitHub - apache/incubator-devlake: Apache DevLake is an open-source dev data platform to ingest, ana", + "display_title":"optional-custom-deploy-display-title", + "commit_sha":"e.g. 015e3d3b480e417aede5a1293bd61de9b0fd051d", + "start_time":"Optional, e.g. 2020-01-01T12:00:00+00:00" + }'`, apiKey: res.apiKey, }); onSubmitAfter?.(res.id); diff --git a/config-ui/src/plugins/register/webhook/components/view-dialog.tsx b/config-ui/src/plugins/register/webhook/components/view-dialog.tsx index bb44c7a39..d2f80a181 100644 --- a/config-ui/src/plugins/register/webhook/components/view-dialog.tsx +++ b/config-ui/src/plugins/register/webhook/components/view-dialog.tsx @@ -51,14 +51,12 @@ const transformURI = (prefix: string, webhook: IWebhook, apiKey: string) => { postDeploymentsCurl: `curl ${prefix}${webhook.postPipelineDeployTaskEndpoint} -X 'POST' -H 'Authorization: Bearer ${ apiKey ?? '{API_KEY}' }' -d '{ - "deployment_commits":[ - { - "commit_sha":"the sha of deployment commit1", - "repo_url":"the repo URL of the deployment commit" - } - ], - "start_time":"Optional, eg. 2020-01-01T12:00:00+00:00" - }'`, + "pipeline_id": "Required. This will be the unique id of the deployment", + "repo_url":"e.g. GitHub - apache/incubator-devlake: Apache DevLake is an open-source dev data platform to ingest, ana", + "display_title":"optional-custom-deploy-display-title", + "commit_sha":"e.g. 015e3d3b480e417aede5a1293bd61de9b0fd051d", + "start_time":"Optional, e.g. 2020-01-01T12:00:00+00:00" + }'`, }; };
