From e61ca36c7e36bdf23b29dd90c9bfd496faef71a1 Mon Sep 17 00:00:00 2001 From: Wing Fung Lau <4760060+hawflau@users.noreply.github.com> Date: Tue, 13 Jun 2023 09:25:58 -0700 Subject: [PATCH 1/2] Revert "add sleep between close and reopen (#5320)" This reverts commit 5be690c88d580cfeee7731f549c75ed7543f47c5. --- .github/workflows/automated-updates-to-sam-cli.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/automated-updates-to-sam-cli.yml b/.github/workflows/automated-updates-to-sam-cli.yml index 4aadea2967..9fd9c846da 100644 --- a/.github/workflows/automated-updates-to-sam-cli.yml +++ b/.github/workflows/automated-updates-to-sam-cli.yml @@ -50,7 +50,6 @@ jobs: git push --force origin update_app_templates_hash gh pr list --repo aws/aws-sam-cli --head update_app_templates_hash --json id --jq length | grep 1 && \ gh pr close update_app_templates_hash --repo aws/aws-sam-cli && \ - sleep 2 && \ gh pr reopen update_app_templates_hash --repo aws/aws-sam-cli && \ exit 0 # if there is exisitng pr, close/reopen to re-run checks, then exit gh pr create --base develop --head update_app_templates_hash --title "feat: update SAM CLI with latest App Templates commit hash" --body "This PR & commit is automatically created from App Templates repo to update the SAM CLI with latest hash of the App Templates." --label "pr/internal" @@ -111,7 +110,6 @@ jobs: git push --force origin update_sam_transform_version gh pr list --repo aws/aws-sam-cli --head update_sam_transform_version --json id --jq length | grep 1 && \ gh pr close update_sam_transform_version --repo aws/aws-sam-cli && \ - sleep 2 && \ gh pr reopen update_sam_transform_version --repo aws/aws-sam-cli && \ exit 0 # if there is exisitng pr, close/reopen to re-run checks, then exit gh pr create --base develop --head update_sam_transform_version --fill --label "pr/internal" @@ -171,7 +169,6 @@ jobs: git push --force origin update_lambda_builders_version gh pr list --repo aws/aws-sam-cli --head update_lambda_builders_version --json id --jq length | grep 1 && \ gh pr close update_lambda_builders_version --repo aws/aws-sam-cli && \ - sleep 2 && \ gh pr reopen update_lambda_builders_version --repo aws/aws-sam-cli && \ exit 0 # if there is exisitng pr, close/reopen to re-run checks, then exit gh pr create --base develop --head update_lambda_builders_version --fill --label "pr/internal" From a6f607bd7820ee9813f75db74f9b3e9dabd963d4 Mon Sep 17 00:00:00 2001 From: Wing Fung Lau <4760060+hawflau@users.noreply.github.com> Date: Tue, 13 Jun 2023 09:28:08 -0700 Subject: [PATCH 2/2] Revert "update automated updates gha to force restart of status checks (#5269)" This reverts commit deb212bc21eda2be0290e9a30f296aa74331e6c3. --- .../automated-updates-to-sam-cli.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/automated-updates-to-sam-cli.yml b/.github/workflows/automated-updates-to-sam-cli.yml index 9fd9c846da..45c49f727a 100644 --- a/.github/workflows/automated-updates-to-sam-cli.yml +++ b/.github/workflows/automated-updates-to-sam-cli.yml @@ -48,10 +48,7 @@ jobs: run: | cd aws-sam-cli git push --force origin update_app_templates_hash - gh pr list --repo aws/aws-sam-cli --head update_app_templates_hash --json id --jq length | grep 1 && \ - gh pr close update_app_templates_hash --repo aws/aws-sam-cli && \ - gh pr reopen update_app_templates_hash --repo aws/aws-sam-cli && \ - exit 0 # if there is exisitng pr, close/reopen to re-run checks, then exit + gh pr list --repo aws/aws-sam-cli --head update_app_templates_hash --json id --jq length | grep 1 && exit 0 # exit if there is existing pr gh pr create --base develop --head update_app_templates_hash --title "feat: update SAM CLI with latest App Templates commit hash" --body "This PR & commit is automatically created from App Templates repo to update the SAM CLI with latest hash of the App Templates." --label "pr/internal" updateSAMTranslator: @@ -68,13 +65,13 @@ jobs: path: serverless-application-model ref: main fetch-depth: 0 - + - name: Checkout SAM CLI uses: actions/checkout@v3 with: repository: aws/aws-sam-cli path: aws-sam-cli - + - uses: actions/setup-python@v4 # used for make update-reproducible-reqs below with: python-version: | @@ -108,10 +105,7 @@ jobs: run: | cd aws-sam-cli git push --force origin update_sam_transform_version - gh pr list --repo aws/aws-sam-cli --head update_sam_transform_version --json id --jq length | grep 1 && \ - gh pr close update_sam_transform_version --repo aws/aws-sam-cli && \ - gh pr reopen update_sam_transform_version --repo aws/aws-sam-cli && \ - exit 0 # if there is exisitng pr, close/reopen to re-run checks, then exit + gh pr list --repo aws/aws-sam-cli --head update_sam_transform_version --json id --jq length | grep 1 && exit 0 # exit if there is existing pr gh pr create --base develop --head update_sam_transform_version --fill --label "pr/internal" updateAWSLambdaBuilders: @@ -167,8 +161,5 @@ jobs: run: | cd aws-sam-cli git push --force origin update_lambda_builders_version - gh pr list --repo aws/aws-sam-cli --head update_lambda_builders_version --json id --jq length | grep 1 && \ - gh pr close update_lambda_builders_version --repo aws/aws-sam-cli && \ - gh pr reopen update_lambda_builders_version --repo aws/aws-sam-cli && \ - exit 0 # if there is exisitng pr, close/reopen to re-run checks, then exit + gh pr list --repo aws/aws-sam-cli --head update_lambda_builders_version --json id --jq length | grep 1 && exit 0 # exit if there is existing pr gh pr create --base develop --head update_lambda_builders_version --fill --label "pr/internal"