fix: alert button not defining the As prop #1511
Workflow file for this run
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: Demo link | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| jobs: | |
| add_demo_link: | |
| name: Add demo link to PR description | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up GitHub context | |
| id: context | |
| run: | | |
| echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | sed 's/[^[:alnum:]-]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c -63)" >> $GITHUB_ENV | |
| - name: Update PR description | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const branchName = process.env.BRANCH_NAME; | |
| const pullRequestId = context.payload.pull_request.number | |
| github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: pullRequestId, | |
| body: `👀 [Visit Preview](https://${branchName}.preview.welcome-ui.com)` | |
| }); |