diff --git a/.github/workflows/slack-on-issue-create.yml b/.github/workflows/slack-on-issue-create.yml new file mode 100644 index 00000000..5595c73c --- /dev/null +++ b/.github/workflows/slack-on-issue-create.yml @@ -0,0 +1,44 @@ +name: Notify Slack on Issue Creation +permissions: + issues: read + +on: + issues: + types: [opened] + +jobs: + send-notification: + runs-on: ubuntu-latest + + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install requests + + - name: Send notification to Slack + env: + SLACK_NOTIFY_TO_CDI_JIRA_WEBHOOK: ${{ secrets.SLACK_NOTIFY_TO_CDI_JIRA_WEBHOOK }} + ISSUE_TITLE: ${{ github.event.issue.title }} + ISSUE_BODY: ${{ github.event.issue.body }} + REPOSITORY_NAME: ${{ github.repository }} + GITHUB_EVENT_ISSUE_HTML_URL: ${{ github.event.issue.html_url }} + run: | + python <