matrix-bot.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Matrix bot
  2. on:
  3. pull_request_target:
  4. types: [opened, closed]
  5. jobs:
  6. new-pr:
  7. if: github.event.action == 'opened' && github.repository == 'smoltcp-rs/smoltcp'
  8. runs-on: ubuntu-latest
  9. continue-on-error: true
  10. steps:
  11. - name: send message
  12. uses: s3krit/[email protected]
  13. with:
  14. room_id: ${{ secrets.MATRIX_ROOM_ID }}
  15. access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
  16. message: "New PR: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
  17. server: "matrix.org"
  18. merged-pr:
  19. if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.repository == 'smoltcp-rs/smoltcp'
  20. runs-on: ubuntu-latest
  21. continue-on-error: true
  22. steps:
  23. - name: send message
  24. uses: s3krit/[email protected]
  25. with:
  26. room_id: ${{ secrets.MATRIX_ROOM_ID }}
  27. access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
  28. message: "PR merged: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
  29. server: "matrix.org"
  30. abandoned-pr:
  31. if: github.event.action == 'closed' && github.event.pull_request.merged == false && github.repository == 'smoltcp-rs/smoltcp'
  32. runs-on: ubuntu-latest
  33. continue-on-error: true
  34. steps:
  35. - name: send message
  36. uses: s3krit/[email protected]
  37. with:
  38. room_id: ${{ secrets.MATRIX_ROOM_ID }}
  39. access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
  40. message: "PR closed without merging: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
  41. server: "matrix.org"