From c085b1e2a00a10a24a0a34c9d22c631fe58d6036 Mon Sep 17 00:00:00 2001 From: Tu Nguyen Date: Mon, 27 Mar 2023 08:40:08 -0700 Subject: [PATCH] Fix Edu Jira automation (#16778) --- .github/workflows/jira-issues.yaml | 2 +- .github/workflows/jira-pr.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jira-issues.yaml b/.github/workflows/jira-issues.yaml index f3eabf888352..d595e5f5af8c 100644 --- a/.github/workflows/jira-issues.yaml +++ b/.github/workflows/jira-issues.yaml @@ -59,7 +59,7 @@ jobs: # Education Jira - name: Create ticket in Education board an issue is filed, or if PR not by a team member is opened - if: github.event.action == 'opened' && ("${{ contains(github.event.issue.labels.*.name, 'type/docs') }}" == "true") + if: github.event.action == 'opened' && contains(github.event.issue.labels.*.name, 'type/docs') uses: tomhjp/gh-action-jira-create@v0.2.1 with: project: CE diff --git a/.github/workflows/jira-pr.yaml b/.github/workflows/jira-pr.yaml index 33b66093382f..9bce26588ebd 100644 --- a/.github/workflows/jira-pr.yaml +++ b/.github/workflows/jira-pr.yaml @@ -78,12 +78,12 @@ jobs: # Education Jira - name: Create ticket in Education board an issue is filed, or if PR not by a team member is opened - if: github.event.action == 'opened' && steps.is-team-member.outputs.MESSAGE == 'false' && ("${{ contains(github.event.issue.labels.*.name, 'type/docs') }}" == "true") + if: github.event.action == 'opened' && steps.is-team-member.outputs.MESSAGE == 'false' && contains(github.event.issue.labels.*.name, 'type/docs') uses: tomhjp/gh-action-jira-create@v0.2.1 with: project: CE issuetype: "${{ steps.set-ticket-type.outputs.TYPE }}" - summary: "${{ github.event.repository.name }} [${{ steps.set-ticket-type.outputs.TYPE }} #${{ github.event.issue.number }}]: ${{ github.event.issue.title }}" + summary: "${{ github.event.repository.name }} [${{ steps.set-ticket-type.outputs.TYPE }} #${{ github.event.pull_request.number }}]: ${{ github.event.pull_request.title }}" description: "GitHub URL: ${{ github.event.issue.html_url || github.event.pull_request.html_url }}\n\n${{ github.event.issue.body || github.event.pull_request.body }}\n\n_Created in GitHub by ${{ github.actor }}._" # customfield_10089 is "Issue Link", customfield_10371 is "Source" (use JIRA API to retrieve) extraFields: '{ "components": [{ "name": "${{ github.event.repository.name }}" }] }'