[App] Arbitrum DAO Grants #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Post preview link on new content issues | |
| on: | |
| issues: | |
| types: [labeled] | |
| jobs: | |
| preview-comment: | |
| if: contains(fromJSON('["app", "mechanism", "research", "case-study", "campaign"]'), github.event.label.name) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Post preview comment | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const issue = context.issue.number; | |
| const type = '${{ github.event.label.name }}'; | |
| const siteUrl = 'https://www.gitcoin.co'; | |
| const previewUrl = `${siteUrl}/preview?issue=${issue}&type=${type}`; | |
| await github.rest.issues.createComment({ | |
| ...context.repo, | |
| issue_number: issue, | |
| body: [ | |
| `### Preview your submission`, | |
| ``, | |
| `[View preview](${previewUrl})`, | |
| ``, | |
| `Once reviewed and approved by a maintainer, your content will be published to the site.`, | |
| ].join('\n'), | |
| }); |