From 51c6440ae39dc219beb8a8b32e72bdeebc698862 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sat, 11 Nov 2023 16:46:33 +0100 Subject: [PATCH 01/36] Add Google Apps Script file icon --- icons/apps-script.svg | 8 ++++++++ src/icons/fileIcons.ts | 1 + 2 files changed, 9 insertions(+) create mode 100644 icons/apps-script.svg diff --git a/icons/apps-script.svg b/icons/apps-script.svg new file mode 100644 index 0000000000..4bdaa3e135 --- /dev/null +++ b/icons/apps-script.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/icons/fileIcons.ts b/src/icons/fileIcons.ts index 119892d440..152decf458 100644 --- a/src/icons/fileIcons.ts +++ b/src/icons/fileIcons.ts @@ -2464,5 +2464,6 @@ export const fileIcons: FileIcons = { fileExtensions: ['abap', 'acds', 'asddls'], }, { name: 'lottie', fileExtensions: ['lottie'] }, + { name: 'apps-script', fileExtensions: ['gs'] }, ], }; From 90e2f19dcf0d725e61ad10bfe0172d2d3fae1b47 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sat, 11 Nov 2023 16:49:00 +0100 Subject: [PATCH 02/36] Update icon size --- icons/apps-script.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icons/apps-script.svg b/icons/apps-script.svg index 4bdaa3e135..aadb621b7b 100644 --- a/icons/apps-script.svg +++ b/icons/apps-script.svg @@ -1,5 +1,5 @@ - + From 4a2cb0a9bfcb4971c083113c5af290379f2b7292 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 13:04:13 +0100 Subject: [PATCH 03/36] Icon preview workflow (#2144) * Add workflow file * Update workflow file --- .github/workflows/icon-review.yml | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/icon-review.yml diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml new file mode 100644 index 0000000000..8dc174ee6a --- /dev/null +++ b/.github/workflows/icon-review.yml @@ -0,0 +1,46 @@ +name: Icon Review + +on: + pull_request: + types: [opened, synchronize] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Generate SVG previews + run: | + svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') + npx svg-icon-review ${svgFiles} + + - name: Post previews in PR + uses: actions/github-script@v5 + with: + script: | + const fs = require('fs'); + const path = require('path'); + const github = require('@actions/github'); + const core = require('@actions/core'); + + const context = github.context; + const token = core.getInput('github-token', {required: true}); + const octokit = github.getOctokit(token); + + const png_files = fs.readdirSync('.').filter(fn => fn.endsWith('.png')); + + for (const png_file of png_files) { + const content = fs.readFileSync(png_file, 'base64'); + const comment = `!${png_file}`; + + octokit.rest.issues.createComment({ + ...context.repo, + issue_number: context.issue.number, + body: comment + }); + } + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ba29e5ccf6fa7a8236132f1a2f87c0d7ef04c231 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 13:09:38 +0100 Subject: [PATCH 04/36] Update workflow file --- .github/workflows/icon-review.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 8dc174ee6a..b1e21cbd89 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -2,17 +2,20 @@ name: Icon Review on: pull_request: - types: [opened, synchronize] + paths: + - 'icons/*.svg' jobs: - build: + icon-review: + name: Icon Review runs-on: ubuntu-latest - + env: + TARGET_BRANCH: ${{ github.event.pull_request.base.ref }} steps: - - name: Checkout code + - name: Checkout 🛎️ uses: actions/checkout@v3 - - name: Generate SVG previews + - name: Review SVG files 🔍 run: | svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') npx svg-icon-review ${svgFiles} From d8f0bf44bc8a76492a6fc88b5ef76cb7fb239d36 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 13:09:55 +0100 Subject: [PATCH 05/36] Update colors --- icons/apps-script.svg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icons/apps-script.svg b/icons/apps-script.svg index aadb621b7b..eab6ca52ed 100644 --- a/icons/apps-script.svg +++ b/icons/apps-script.svg @@ -1,8 +1,8 @@ - - - - + + + + From 81c95259b9be4f8b51bb0fc2d0cdb490441ef876 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 13:15:05 +0100 Subject: [PATCH 06/36] Icon preview workflow (#2144) * Add workflow file * Update workflow file --- .github/workflows/icon-review.yml | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/icon-review.yml diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml new file mode 100644 index 0000000000..ccc52598da --- /dev/null +++ b/.github/workflows/icon-review.yml @@ -0,0 +1,51 @@ +name: Icon Review + +on: + pull_request: + paths: + - 'icons/*.svg' + +jobs: + icon-review: + name: Icon Review + runs-on: ubuntu-latest + env: + TARGET_BRANCH: ${{ github.event.pull_request.base.ref }} + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Review SVG files 🔍 + run: | + svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') + npx svg-icon-review ${svgFiles} + + - name: Post previews in PR + uses: actions/github-script@v5 + with: + script: | + const fs = require('fs'); + const path = require('path'); + const github = require('@actions/github'); + const core = require('@actions/core'); + + const context = github.context; + const token = core.getInput('github-token', {required: true}); + const octokit = github.getOctokit(token); + + const png_files = fs.readdirSync('.').filter(fn => fn.endsWith('.png')); + + for (const png_file of png_files) { + const content = fs.readFileSync(png_file, 'base64'); + const comment = `!${png_file}`; + + octokit.rest.issues.createComment({ + ...context.repo, + issue_number: context.issue.number, + body: comment + }); + } + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 14782f0cb96f8a2f1bbe7e4feef44a0798e13906 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 13:21:55 +0100 Subject: [PATCH 07/36] Update workflow file --- .github/workflows/icon-review.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index ccc52598da..429bf2e0a6 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -28,7 +28,6 @@ jobs: script: | const fs = require('fs'); const path = require('path'); - const github = require('@actions/github'); const core = require('@actions/core'); const context = github.context; From d78e32ad6b72e01161341eebe829dbf67f5d254f Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 13:23:07 +0100 Subject: [PATCH 08/36] Update workflow file --- .github/workflows/icon-review.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 429bf2e0a6..c1fd8c0f4a 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -28,7 +28,6 @@ jobs: script: | const fs = require('fs'); const path = require('path'); - const core = require('@actions/core'); const context = github.context; const token = core.getInput('github-token', {required: true}); From 2573b2c7d9a28fdc8dc7b625d2a741aef58590b4 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 13:25:21 +0100 Subject: [PATCH 09/36] Update workflow file --- .github/workflows/icon-review.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index c1fd8c0f4a..ce02cc6432 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -29,7 +29,6 @@ jobs: const fs = require('fs'); const path = require('path'); - const context = github.context; const token = core.getInput('github-token', {required: true}); const octokit = github.getOctokit(token); From 93f42775d678203cd2cd6443b0ee1e420cd6c51f Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 13:39:23 +0100 Subject: [PATCH 10/36] Update workflow file --- .github/workflows/icon-review.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index ce02cc6432..482dcd54d1 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -23,26 +23,20 @@ jobs: npx svg-icon-review ${svgFiles} - name: Post previews in PR - uses: actions/github-script@v5 + uses: actions/github-script@v6 with: script: | const fs = require('fs'); - const path = require('path'); + const pngFilePath = './preview.png'; - const token = core.getInput('github-token', {required: true}); - const octokit = github.getOctokit(token); + const data = fs.readFileSync(pngFilePath); + const base64Data = data.toString('base64'); - const png_files = fs.readdirSync('.').filter(fn => fn.endsWith('.png')); - - for (const png_file of png_files) { - const content = fs.readFileSync(png_file, 'base64'); - const comment = `!${png_file}`; - - octokit.rest.issues.createComment({ - ...context.repo, - issue_number: context.issue.number, - body: comment - }); - } + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `![Generated PNG](data:image/png;base64,${base64Data})` + }) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 24f287dc56679160c79073bc9535ffd937e17b4b Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 14:14:57 +0100 Subject: [PATCH 11/36] Update workflow file --- .github/workflows/icon-review.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 482dcd54d1..6ccff2efdf 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -22,21 +22,29 @@ jobs: svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') npx svg-icon-review ${svgFiles} + - name: Upload PNG to Repository + run: | + mkdir -p review-images + mv ./preview.png review-images/ + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add review-images/ + git commit -m "Add generated review image" + git push origin + - name: Post previews in PR uses: actions/github-script@v6 with: script: | const fs = require('fs'); const pngFilePath = './preview.png'; - - const data = fs.readFileSync(pngFilePath); - const base64Data = data.toString('base64'); + const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + context.sha + '/review-images/preview.png)'; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `![Generated PNG](data:image/png;base64,${base64Data})` + body: commentBody }) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4a615db950d1ea4aa1d74c52ea40a6b057780bc1 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 14:25:55 +0100 Subject: [PATCH 12/36] Icon preview workflow (#2144) * Add workflow file * Update workflow file --- .github/workflows/icon-review.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 6ccff2efdf..86b04cf710 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -28,9 +28,10 @@ jobs: mv ./preview.png review-images/ git config user.name "GitHub Actions" git config user.email "actions@github.com" + git checkout -b review-images git add review-images/ git commit -m "Add generated review image" - git push origin + git push origin review-images - name: Post previews in PR uses: actions/github-script@v6 From 0f3e5ac524ba5baff1152ad85d1df8034dfff590 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 14:32:35 +0100 Subject: [PATCH 13/36] Icon preview workflow (#2144) * Add workflow file * Update workflow file --- .github/workflows/icon-review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 86b04cf710..ca81081a80 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -25,7 +25,7 @@ jobs: - name: Upload PNG to Repository run: | mkdir -p review-images - mv ./preview.png review-images/ + mv ./preview.png review-images/${{ github.event.pull_request.number }}.png git config user.name "GitHub Actions" git config user.email "actions@github.com" git checkout -b review-images @@ -39,7 +39,7 @@ jobs: script: | const fs = require('fs'); const pngFilePath = './preview.png'; - const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + context.sha + '/review-images/preview.png)'; + const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}.png'; github.rest.issues.createComment({ issue_number: context.issue.number, From 4d04266d603410ee93bfcdf8b9ef4e3a282b5beb Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 14:34:10 +0100 Subject: [PATCH 14/36] Update workflow file --- .github/workflows/icon-review.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index ca81081a80..b43ad6b3d6 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -29,6 +29,7 @@ jobs: git config user.name "GitHub Actions" git config user.email "actions@github.com" git checkout -b review-images + git pull origin review-images git add review-images/ git commit -m "Add generated review image" git push origin review-images From c310c93f2a6bb71b90a0a4209b0aeb9e5736e01c Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 14:35:15 +0100 Subject: [PATCH 15/36] Update workflow file --- .github/workflows/icon-review.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index b43ad6b3d6..2bc1420000 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -29,6 +29,7 @@ jobs: git config user.name "GitHub Actions" git config user.email "actions@github.com" git checkout -b review-images + git config pull.rebase true git pull origin review-images git add review-images/ git commit -m "Add generated review image" From 0269bd80a3fe878a926d3edcfd61432a73cb871b Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 14:37:06 +0100 Subject: [PATCH 16/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 2bc1420000..2eda7ac931 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -41,7 +41,7 @@ jobs: script: | const fs = require('fs'); const pngFilePath = './preview.png'; - const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}.png'; + const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}.png)'; github.rest.issues.createComment({ issue_number: context.issue.number, From 634e452506086d04a09c0acd8be95ddff9cd6f3b Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 14:50:40 +0100 Subject: [PATCH 17/36] Update workflow file --- .github/workflows/icon-review.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 2eda7ac931..8906ee838c 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -20,6 +20,7 @@ jobs: - name: Review SVG files 🔍 run: | svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') + echo "SVG files changed: ${svgFiles}" npx svg-icon-review ${svgFiles} - name: Upload PNG to Repository From b0eda40a4fa7e6765b8860dc0e70ff57f7e9c142 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:09:44 +0100 Subject: [PATCH 18/36] Update workflow file --- .github/workflows/icon-review.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 8906ee838c..0c0713800f 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -27,6 +27,7 @@ jobs: run: | mkdir -p review-images mv ./preview.png review-images/${{ github.event.pull_request.number }}.png + mv ./preview.html review-images/${{ github.event.pull_request.number }}.html git config user.name "GitHub Actions" git config user.email "actions@github.com" git checkout -b review-images From ad369e848b506ec8619e980ed7df7abdcffbbc77 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:20:43 +0100 Subject: [PATCH 19/36] Update workflow file --- .github/workflows/icon-review.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 0c0713800f..8906ee838c 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -27,7 +27,6 @@ jobs: run: | mkdir -p review-images mv ./preview.png review-images/${{ github.event.pull_request.number }}.png - mv ./preview.html review-images/${{ github.event.pull_request.number }}.html git config user.name "GitHub Actions" git config user.email "actions@github.com" git checkout -b review-images From b71ccbf91329721dd1200126e017c5bb544730d3 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:25:22 +0100 Subject: [PATCH 20/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 8906ee838c..7a7cc14488 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -23,7 +23,7 @@ jobs: echo "SVG files changed: ${svgFiles}" npx svg-icon-review ${svgFiles} - - name: Upload PNG to Repository + - name: Upload PNG to Repository ⬆️ run: | mkdir -p review-images mv ./preview.png review-images/${{ github.event.pull_request.number }}.png From f654783b77899cdaac216c0f6a18a5d439a2b8ff Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:26:26 +0100 Subject: [PATCH 21/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 7a7cc14488..6e549921de 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -31,7 +31,7 @@ jobs: git config user.email "actions@github.com" git checkout -b review-images git config pull.rebase true - git pull origin review-images + git pull git add review-images/ git commit -m "Add generated review image" git push origin review-images From 8cbd3ae551a6449ba451a07f5cfd8f35f6458ce7 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:28:36 +0100 Subject: [PATCH 22/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 6e549921de..7a7cc14488 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -31,7 +31,7 @@ jobs: git config user.email "actions@github.com" git checkout -b review-images git config pull.rebase true - git pull + git pull origin review-images git add review-images/ git commit -m "Add generated review image" git push origin review-images From 44b5c5d548c1b618acb938cf915df56855a0a0d7 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:37:12 +0100 Subject: [PATCH 23/36] Update icon --- icons/apps-script.svg | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/icons/apps-script.svg b/icons/apps-script.svg index eab6ca52ed..021d917ab5 100644 --- a/icons/apps-script.svg +++ b/icons/apps-script.svg @@ -1,8 +1 @@ - - - - - - - - + From dc8ca92bf950decfc5773a487eb52c839a11b6fe Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:40:28 +0100 Subject: [PATCH 24/36] Update icon --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 7a7cc14488..04aa2b0146 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -30,10 +30,10 @@ jobs: git config user.name "GitHub Actions" git config user.email "actions@github.com" git checkout -b review-images + git commit -m "Add generated review image" git config pull.rebase true git pull origin review-images git add review-images/ - git commit -m "Add generated review image" git push origin review-images - name: Post previews in PR From 0746963d5748c02d532a6d2c4d896f447ef98636 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:42:06 +0100 Subject: [PATCH 25/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 04aa2b0146..4efc8b07e0 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -30,10 +30,10 @@ jobs: git config user.name "GitHub Actions" git config user.email "actions@github.com" git checkout -b review-images + git add review-images/ git commit -m "Add generated review image" git config pull.rebase true git pull origin review-images - git add review-images/ git push origin review-images - name: Post previews in PR From d3625d2c35d4e0c80bcbebe4e41aaed6f9c36689 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:43:27 +0100 Subject: [PATCH 26/36] Update workflow file --- .github/workflows/icon-review.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 4efc8b07e0..4d62882b16 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -33,8 +33,7 @@ jobs: git add review-images/ git commit -m "Add generated review image" git config pull.rebase true - git pull origin review-images - git push origin review-images + git push origin review-images --force - name: Post previews in PR uses: actions/github-script@v6 From eb964970d80b0e7a485f4ae4e9727d1db0dee46b Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:48:05 +0100 Subject: [PATCH 27/36] Update workflow file --- .github/workflows/icon-review.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 4d62882b16..bd7be0bfdf 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -26,14 +26,15 @@ jobs: - name: Upload PNG to Repository ⬆️ run: | mkdir -p review-images - mv ./preview.png review-images/${{ github.event.pull_request.number }}.png + mv ./preview.png review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png git config user.name "GitHub Actions" git config user.email "actions@github.com" git checkout -b review-images git add review-images/ git commit -m "Add generated review image" git config pull.rebase true - git push origin review-images --force + git pull origin review-images -X ours + git push origin review-images - name: Post previews in PR uses: actions/github-script@v6 @@ -41,7 +42,7 @@ jobs: script: | const fs = require('fs'); const pngFilePath = './preview.png'; - const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}.png)'; + const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png)'; github.rest.issues.createComment({ issue_number: context.issue.number, From b40c8e845185ca152686668b8d7f655fe1dd2266 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 15:52:38 +0100 Subject: [PATCH 28/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index bd7be0bfdf..ff55dccb3e 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -42,7 +42,7 @@ jobs: script: | const fs = require('fs'); const pngFilePath = './preview.png'; - const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png)'; + const commentBody = '## Preview \n\nPlease check if your contributed icons are looking good on dark and light theme: \n\n ![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png) \n\n You can find more information how to contribute in the [contribution guidelines](https://github.com/PKief/vscode-material-icon-theme/blob/main/CONTRIBUTING.md).'; github.rest.issues.createComment({ issue_number: context.issue.number, From e80c50c99fe7686c3dd3fa09a8a01ab47f136b38 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 17:17:32 +0100 Subject: [PATCH 29/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index ff55dccb3e..63752bedb1 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -17,7 +17,7 @@ jobs: with: fetch-depth: 0 - - name: Review SVG files 🔍 + - name: Review SVG files 🔍 run: | svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') echo "SVG files changed: ${svgFiles}" From a7e4f534cba528f386e0519cf27e74fb6c9012e1 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 17:21:04 +0100 Subject: [PATCH 30/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 63752bedb1..ff55dccb3e 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -17,7 +17,7 @@ jobs: with: fetch-depth: 0 - - name: Review SVG files 🔍 + - name: Review SVG files 🔍 run: | svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') echo "SVG files changed: ${svgFiles}" From 8016c7560e04c06c402e552ad746b323709267bf Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 17:51:41 +0100 Subject: [PATCH 31/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index ff55dccb3e..072e6c83f5 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -36,7 +36,7 @@ jobs: git pull origin review-images -X ours git push origin review-images - - name: Post previews in PR + - name: Post review in PR ✍️ uses: actions/github-script@v6 with: script: | From cb9997a3f1ccdf070b89ae7d3b0d197a7b5134e6 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sun, 12 Nov 2023 17:55:02 +0100 Subject: [PATCH 32/36] Update workflow file --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 072e6c83f5..b75f8a184f 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -42,7 +42,7 @@ jobs: script: | const fs = require('fs'); const pngFilePath = './preview.png'; - const commentBody = '## Preview \n\nPlease check if your contributed icons are looking good on dark and light theme: \n\n ![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png) \n\n You can find more information how to contribute in the [contribution guidelines](https://github.com/PKief/vscode-material-icon-theme/blob/main/CONTRIBUTING.md).'; + const commentBody = '## Preview \n\nPlease check if your contributed icons are looking good both on dark and light theme: \n\n ![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png) \n\n You can find more information how to contribute in the [contribution guidelines](https://github.com/PKief/vscode-material-icon-theme/blob/main/CONTRIBUTING.md).'; github.rest.issues.createComment({ issue_number: context.issue.number, From d7423a7898a0bf0bc0b1c8ab9fc586b9f5489114 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Mon, 13 Nov 2023 18:58:45 +0100 Subject: [PATCH 33/36] Update worfklow --- .github/workflows/icon-review.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index b75f8a184f..55b19226fc 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -33,7 +33,6 @@ jobs: git add review-images/ git commit -m "Add generated review image" git config pull.rebase true - git pull origin review-images -X ours git push origin review-images - name: Post review in PR ✍️ From 171360f9ffa614bf4edfc9a6a7e7937e123ed8a9 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Mon, 13 Nov 2023 19:06:35 +0100 Subject: [PATCH 34/36] Update worfklow --- .github/workflows/icon-review.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index 55b19226fc..ce715a2d17 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -29,11 +29,11 @@ jobs: mv ./preview.png review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png git config user.name "GitHub Actions" git config user.email "actions@github.com" - git checkout -b review-images + git fetch origin + git checkout -b review-images origin/review-images --no-track git add review-images/ git commit -m "Add generated review image" - git config pull.rebase true - git push origin review-images + git push -u origin review-images - name: Post review in PR ✍️ uses: actions/github-script@v6 From c00c47dc2b6faf4bed6e02805c5e9f55b9bb6af4 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Mon, 13 Nov 2023 20:03:07 +0100 Subject: [PATCH 35/36] Update message --- .github/workflows/icon-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml index ce715a2d17..cb2979d5ed 100644 --- a/.github/workflows/icon-review.yml +++ b/.github/workflows/icon-review.yml @@ -41,7 +41,7 @@ jobs: script: | const fs = require('fs'); const pngFilePath = './preview.png'; - const commentBody = '## Preview \n\nPlease check if your contributed icons are looking good both on dark and light theme: \n\n ![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png) \n\n You can find more information how to contribute in the [contribution guidelines](https://github.com/PKief/vscode-material-icon-theme/blob/main/CONTRIBUTING.md).'; + const commentBody = '## Preview \n\nThank you for creating a pull request. This preview shows you how your changes will look on the different themes: \n\n ![Generated Preview](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png) \n\n You can find more information how to contribute in the [contribution guidelines](https://github.com/PKief/vscode-material-icon-theme/blob/main/CONTRIBUTING.md).'; github.rest.issues.createComment({ issue_number: context.issue.number, From e956679bf6f9e300d0176cf6be06c995d24f909f Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Mon, 13 Nov 2023 20:33:33 +0100 Subject: [PATCH 36/36] Remove workflow file --- .github/workflows/icon-review.yml | 53 ------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/icon-review.yml diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml deleted file mode 100644 index cb2979d5ed..0000000000 --- a/.github/workflows/icon-review.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Icon Review - -on: - pull_request: - paths: - - 'icons/*.svg' - -jobs: - icon-review: - name: Icon Review - runs-on: ubuntu-latest - env: - TARGET_BRANCH: ${{ github.event.pull_request.base.ref }} - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Review SVG files 🔍 - run: | - svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') - echo "SVG files changed: ${svgFiles}" - npx svg-icon-review ${svgFiles} - - - name: Upload PNG to Repository ⬆️ - run: | - mkdir -p review-images - mv ./preview.png review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - git fetch origin - git checkout -b review-images origin/review-images --no-track - git add review-images/ - git commit -m "Add generated review image" - git push -u origin review-images - - - name: Post review in PR ✍️ - uses: actions/github-script@v6 - with: - script: | - const fs = require('fs'); - const pngFilePath = './preview.png'; - const commentBody = '## Preview \n\nThank you for creating a pull request. This preview shows you how your changes will look on the different themes: \n\n ![Generated Preview](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png) \n\n You can find more information how to contribute in the [contribution guidelines](https://github.com/PKief/vscode-material-icon-theme/blob/main/CONTRIBUTING.md).'; - - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: commentBody - }) - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}