From 58319a8961958f24fa4ceef12a11ca0491c6ca8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 11:35:16 +0000 Subject: [PATCH 1/9] Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .../workflows/azure-static-web-apps-orange-moss-06ebe8f10.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-static-web-apps-orange-moss-06ebe8f10.yml b/.github/workflows/azure-static-web-apps-orange-moss-06ebe8f10.yml index 6d17759..424fa6a 100644 --- a/.github/workflows/azure-static-web-apps-orange-moss-06ebe8f10.yml +++ b/.github/workflows/azure-static-web-apps-orange-moss-06ebe8f10.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest name: Build and Deploy Job steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - name: Build And Deploy From 89f6284173326dfbd1e65cb37668e7e3a29d88c4 Mon Sep 17 00:00:00 2001 From: Michael Waddell Date: Fri, 11 Mar 2022 21:38:59 -0600 Subject: [PATCH 2/9] removing readme --- README.md | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 1a8ab5b..0000000 --- a/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# :sunglasses: Azure SWAG demo - -This is a simple barebone demo for [Azure SWAG](https://docs.microsoft.com/azure/static-web-apps?WT.mc_id=javascript-0000-yolasors) (**S**tatic **W**eb **A**pps on **G**itHub). -You can use it as a template for your own apps. - -It includes a website using HTML + JavaScript and an example Node.js API. -See it live [here](https://aka.ms/swag-demo). - -Click on **Use this template** on GitHub, then click on the button below to deploy your own (for free): - -[![Deploy to Azure button](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/?feature.customportal=false&WT.mc_id=javascript-0000-yolasors#create/Microsoft.StaticApp) - -## What's Azure *SWAG*? - -TL;DR: - -> It's an all-inclusive hosting service for web apps with serverless APIs built using JavaScript, based on continuous deployment from a GitHub repository. - -For the longer version with the deployment instructions, [see this full length article](https://dev.to/sinedied/the-easy-way-to-serverless-web-apps-and-apis-with-azure-swag-2heb). - -You can also take a look at [the official docs](https://docs.microsoft.com/azure/static-web-apps?WT.mc_id=javascript-0000-yolasors). From 90d660acec33d50c58e67b3ced2f82e8dc3b0335 Mon Sep 17 00:00:00 2001 From: Michael Waddell Date: Fri, 11 Mar 2022 21:41:29 -0600 Subject: [PATCH 3/9] check it out first --- .github/workflows/auto-approve.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index b665c02..aba891e 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -11,6 +11,7 @@ jobs: - name: Dependabot metadata id: dependabot-metadata uses: dependabot/fetch-metadata@v1.3.0 + - uses: actions/checkout@v3 - name: Approve a PR run: | if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" == "REVIEW_REQUIRED" ]; From d62905adc7eb75be671cd6b65fe9927f52623483 Mon Sep 17 00:00:00 2001 From: Michael Waddell Date: Fri, 11 Mar 2022 21:43:30 -0600 Subject: [PATCH 4/9] forcing checkout --- .github/workflows/auto-approve.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index aba891e..a34d6d0 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -11,7 +11,8 @@ jobs: - name: Dependabot metadata id: dependabot-metadata uses: dependabot/fetch-metadata@v1.3.0 - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - name: Approve a PR run: | if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" == "REVIEW_REQUIRED" ]; From 1ef42d241fd04865d973d8a1f6f89bddaee2069c Mon Sep 17 00:00:00 2001 From: Michael Waddell Date: Fri, 11 Mar 2022 21:44:22 -0600 Subject: [PATCH 5/9] trying pull_request instead --- .github/workflows/auto-approve.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index a34d6d0..fdb628d 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -1,5 +1,5 @@ name: Dependabot auto-approve -on: pull_request_target +on: pull_request permissions: pull-requests: write jobs: From bb4527cc73bc3d278260721886f15ec8657de12d Mon Sep 17 00:00:00 2001 From: Michael Waddell Date: Fri, 11 Mar 2022 21:49:31 -0600 Subject: [PATCH 6/9] fixing --- .github/workflows/auto-approve.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index fdb628d..a11dbd0 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v3 - name: Approve a PR run: | - if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" == "REVIEW_REQUIRED" ]; + if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; then gh pr review --approve "$PR_URL" else echo "PR already approved, skipping additional approvals to minimize emails/notification noise."; fi From 242ae24ff6f4a26cc9b6420d3b63a987bf6f7714 Mon Sep 17 00:00:00 2001 From: Michael Waddell Date: Fri, 11 Mar 2022 21:51:39 -0600 Subject: [PATCH 7/9] Revert "removing readme" This reverts commit 89f6284173326dfbd1e65cb37668e7e3a29d88c4. --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a8ab5b --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# :sunglasses: Azure SWAG demo + +This is a simple barebone demo for [Azure SWAG](https://docs.microsoft.com/azure/static-web-apps?WT.mc_id=javascript-0000-yolasors) (**S**tatic **W**eb **A**pps on **G**itHub). +You can use it as a template for your own apps. + +It includes a website using HTML + JavaScript and an example Node.js API. +See it live [here](https://aka.ms/swag-demo). + +Click on **Use this template** on GitHub, then click on the button below to deploy your own (for free): + +[![Deploy to Azure button](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/?feature.customportal=false&WT.mc_id=javascript-0000-yolasors#create/Microsoft.StaticApp) + +## What's Azure *SWAG*? + +TL;DR: + +> It's an all-inclusive hosting service for web apps with serverless APIs built using JavaScript, based on continuous deployment from a GitHub repository. + +For the longer version with the deployment instructions, [see this full length article](https://dev.to/sinedied/the-easy-way-to-serverless-web-apps-and-apis-with-azure-swag-2heb). + +You can also take a look at [the official docs](https://docs.microsoft.com/azure/static-web-apps?WT.mc_id=javascript-0000-yolasors). From 9901f4af0ee1b387758da7ea3f399ea475716da9 Mon Sep 17 00:00:00 2001 From: Michael Waddell Date: Fri, 11 Mar 2022 21:54:05 -0600 Subject: [PATCH 8/9] logging --- .github/workflows/auto-approve.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index a11dbd0..3453c4f 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -15,6 +15,7 @@ jobs: uses: actions/checkout@v3 - name: Approve a PR run: | + gh pr status --json reviewDecision if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; then gh pr review --approve "$PR_URL" else echo "PR already approved, skipping additional approvals to minimize emails/notification noise."; From 478cf8adb0e27407032e85f3eff33f7dd87414b9 Mon Sep 17 00:00:00 2001 From: Michael Waddell Date: Fri, 11 Mar 2022 22:03:36 -0600 Subject: [PATCH 9/9] adding --- .github/workflows/gh-pr-status.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/gh-pr-status.yml diff --git a/.github/workflows/gh-pr-status.yml b/.github/workflows/gh-pr-status.yml new file mode 100644 index 0000000..b1b512a --- /dev/null +++ b/.github/workflows/gh-pr-status.yml @@ -0,0 +1,15 @@ +name: Get results of `gh pr status` +on: pull_request +permissions: + pull-requests: write +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + BODY=$(gh pr status --json reviewDecision) + gh pr comment "$PR_URL" -b $BODY + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}