Add support for the v1 alerts api. #149
Workflow file for this run
This file contains 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
# This workflow is triggered by pull request and creates an jira ticket if the ticket does not exist in jira | |
# | |
name: pr_notify | |
on: | |
pull_request_target: | |
branches: [v2] | |
permissions: | |
issues: read | |
contents: read | |
pull-requests: read | |
repository-projects: read | |
jobs: | |
jira_job: | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- name: Jira Login | |
uses: atlassian/gajira-login@v3 | |
env: | |
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | |
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | |
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | |
# try to find jira key in the PR title | |
- name: Find jirakey in title | |
id: jira_founded_ticket | |
uses: atlassian/gajira-find-issue-key@master | |
continue-on-error: true | |
with: | |
string: ${{ github.event.pull_request.title }} | |
# if there is no ticket associated then create a new one | |
- name: Jira Create issue | |
id: jira_ticket | |
if: ${{!steps.jira_founded_ticket.outputs.issue}} | |
uses: atlassian/gajira-create@v3 | |
with: | |
project: ${{secrets.JIRA_PROJECT_KEY}} | |
issuetype: Task | |
summary: '[ns1-go] ${{github.event.pull_request.title}}' | |
description: ${{github.event.pull_request.body}} see more at ${{github.event.pull_request.html_url}} |