From 081c2dfeb2e694aeaa2c34353e278ffaf49c367e Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Tue, 23 Dec 2025 17:57:22 -0500 Subject: [PATCH 1/2] Update PR number retrieval in deploy workflow --- .github/workflows/deploy.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 64617de..d9e0aa4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -212,11 +212,24 @@ jobs: run: | echo "inside pr_number=$PR_NUMBER" echo "Before pr_number=$PR_NUMBER" - PR_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/pulls" - PR_NUMBER=$(curl -s -H "Accept: application/vnd.github.groot-preview+json" \ + + PR_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls?state=open" + PR_NUMBER=$(curl -s -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: Bearer $GITHUB_TOKEN" \ - $PR_API_URL | jq '.[0].number') - echo "after pr_number=$PR_NUMBER" + $PR_API_URL | jq '.[] | select(.head.sha == "'${GITHUB_SHA}'") | .number') + if [ -z "$PR_NUMBER" ]; then + echo "No PR associated with this commit. Skipping deployment." + exit 0 + fi + echo "PR_NUMBER=$PR_NUMBER" + + + + #PR_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/pulls" + #PR_NUMBER=$(curl -s -H "Accept: application/vnd.github.groot-preview+json" \ + # -H "Authorization: Bearer $GITHUB_TOKEN" \ + # $PR_API_URL | jq '.[0].number') + #echo "after pr_number=$PR_NUMBER" aws s3 sync s3://$S3_BUCKET_NAME/mergeRequest/$PR_NUMBER s3://$S3_BUCKET_NAME/production/ echo "deploy complete to production !!!" # Delete contents of the pr folder From fdeff1584ea78d65ba1146534683ee12d17bd181 Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Tue, 23 Dec 2025 17:58:58 -0500 Subject: [PATCH 2/2] Add update timestamp to index.md --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 23f9582..12a1919 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,7 +10,7 @@ author: That Would Be Me # Dec 23 04:15 Updating this line # Dec 23 04:39 Updating this line # Dec 23 04:39 Updating this line -# two +# Dec 23 05:58 Updating this line # one # Change seven 7