Skip to content

Commit

Permalink
Update workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed Nov 15, 2023
1 parent ada958b commit b021304
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/icon-review.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Icon Review

permissions:
contents: write

on:
pull_request:
paths:
Expand Down Expand Up @@ -38,21 +35,13 @@ jobs:
git commit -m "Add generated review image"
git push -u origin review-images
- name: Post review in PR ✍️
- name: Post review in PR ✍️
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const pngFilePath = './preview.png';
const commentBody = `
## Preview
Thank you for creating a pull request. This preview shows you how your changes will look on the different themes:
![Generated Preview](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png)
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,
Expand All @@ -61,4 +50,4 @@ jobs:
body: commentBody
})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b021304

Please sign in to comment.