wow-actions / auto-comment

💬 Automatically comment issues or PRs on events triggered
MIT License
36 stars 13 forks source link

feat: ✨ add id arg #13

Closed urish closed 3 years ago

urish commented 3 years ago

add {{id}} arg, allowing you to reference the issue / pull request id in the comment.

For example, our use case is to automatically generate a Netlify preview link in the comment:

name: Add Netlify preview link to pull request
on: [pull_request]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: bubkoo/auto-comment@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          pullRequestOpened: >
            Preview on netlify: https://deploy-preview-{{ id }}--pull-request.netlify.app/
github-actions[bot] commented 3 years ago

👋 @urish Thank you for raising your pull request. Please make sure you have followed our contributing guidelines. We will review it as soon as possible