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

     1  name: Jira closure
     2  
     3  on:
     4    issues:
     5      types: [closed, deleted]
     6  
     7  jobs:
     8    close-issue:
     9      runs-on: ubuntu-latest
    10      steps:
    11        - name: Checkout
    12          uses: actions/checkout@v2
    13          with:
    14            repository: snowflakedb/gh-actions
    15            ref: jira_v1
    16            token: ${{ secrets.SNOWFLAKE_GITHUB_TOKEN }} # stored in GitHub secrets
    17            path: .
    18        - name: Jira login
    19          uses: atlassian/gajira-login@master
    20          env:
    21            JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
    22            JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
    23            JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
    24        - name: Extract issue from title
    25          id: extract
    26          env:
    27            TITLE: "${{ github.event.issue.title }}"
    28          run: |
    29            jira=$(echo -n $TITLE | awk '{print $1}' | sed -e 's/://')
    30            echo ::set-output name=jira::$jira
    31        - name: Close issue
    32          uses: ./jira/gajira-close
    33          if: startsWith(steps.extract.outputs.jira, 'SNOW-')
    34          with:
    35            issue: "${{ steps.extract.outputs.jira }}"