github.com/snowflakedb/gosnowflake@v1.9.0/.github/workflows/jira_issue.yml (about)

     1  name: Jira creation
     2  
     3  on:
     4    issues:
     5      types: [opened]
     6    issue_comment:
     7      types: [created]
     8  
     9  jobs:
    10    create-issue:
    11      runs-on: ubuntu-latest
    12      if: ((github.event_name == 'issue_comment' && github.event.comment.body == 'recreate jira' && github.event.comment.user.login == 'sfc-gh-mkeller') || (github.event_name == 'issues' && github.event.pull_request.user.login != 'whitesource-for-github-com[bot]'))
    13      steps:
    14        - name: Checkout
    15          uses: actions/checkout@v2
    16          with:
    17            repository: snowflakedb/gh-actions
    18            ref: jira_v1
    19            token: ${{ secrets.SNOWFLAKE_GITHUB_TOKEN }} # stored in GitHub secrets
    20            path: .
    21  
    22        - name: Login
    23          uses: atlassian/gajira-login@v2.0.0
    24          env:
    25            JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
    26            JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
    27            JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
    28  
    29        - name: Create JIRA Ticket
    30          id: create
    31          uses: atlassian/gajira-create@v2.0.1
    32          with:
    33            project: SNOW
    34            issuetype: Bug
    35            summary: '${{ github.event.issue.title }}'
    36            description: |
    37              ${{ github.event.issue.body }} \\ \\ _Created from GitHub Action_ for ${{ github.event.issue.html_url }}
    38            fields: '{ "customfield_11401": {"id": "14723"}, "assignee": {"id": "712020:3c0352b5-63f7-4e26-9afe-38f6f9f0f4c5"}, "components":[{"id":"19286"}] }'
    39  
    40        - name: Update GitHub Issue
    41          uses: ./jira/gajira-issue-update
    42          env:
    43            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    44          with:
    45            issue_number: "{{ event.issue.id }}"
    46            owner: "{{ event.repository.owner.login }}"
    47            name: "{{ event.repository.name }}"
    48            jira: "${{ steps.create.outputs.issue }}"