name: Issue Assigned

on:
  issues:
    types: [assigned]

  pull_request_target:
     types: [assigned]
jobs:
  send-mattermost-message:
    runs-on: ubuntu-latest
    steps:
    - uses: mattermost/action-mattermost-notify@master
      with:
        MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_ASSIGN_WEBHOOK }}
        TEXT: >
            ${{ github.event.issue.assignee.login || github.event.pull_request.assignee.login }} assigned to "${{ github.event.issue.title || github.event.pull_request.title }}": ${{ github.event.issue.html_url || github.event.pull_request.html_url }}
