From 7779ba8e29bae4855780ee41841f2582819e79a8 Mon Sep 17 00:00:00 2001 From: Sahil Ahuja Date: Thu, 13 Feb 2025 23:43:15 +0530 Subject: [PATCH] New cs-update trigger --- .github/unused/sh/trigger.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/unused/sh/trigger.sh b/.github/unused/sh/trigger.sh index f3fa8c3..3f00f60 100644 --- a/.github/unused/sh/trigger.sh +++ b/.github/unused/sh/trigger.sh @@ -63,3 +63,16 @@ curl -X 'POST' \ -H 'Authorization: token e139b1c73bfae1b7748961c9f9a381bd3cca0633' \ -H 'Content-Type: application/json' \ -d '{"body":"{\"image\":\"repo2.hub.gmetri.io/dt-api\",\"tag\":\"main-255c2f30\"}"}' + +#Get the latest issue with label workflow +ISSUE_JSON=`curl -X 'GET' \ + 'https://git.gmetri.io/api/v1/repos/gmetrivr/cs-ui/issues?labels=workflow&page=1&limit=1' \ + -H 'accept: application/json' \ + -H 'Authorization: token 20daafd0fb3dd3392738430bf438eb96023b5cb0'` +ISSUE_NUMBER=`echo $ISSUE_JSON | jq '.[0].number'` +curl -X 'POST' \ + 'https://git.gmetri.io/api/v1/repos/gmetrivr/cs-dt/issues/$ISSUE_NUMBER/comments' \ + -H 'accept: application/json' \ + -H 'Authorization: token e139b1c73bfae1b7748961c9f9a381bd3cca0633' \ + -H 'Content-Type: application/json' \ + -d '{"body":"{\"image\":\"repo2.hub.gmetri.io/dt-api\",\"tag\":\"main-255c2f30\"}"}'