From 3bcb55bf4d3ec8410f8cdf5c10925c1e8865c4ac Mon Sep 17 00:00:00 2001 From: Minseo Park <125115284+FpRaArNkK@users.noreply.github.com> Date: Fri, 3 Jan 2025 23:05:13 +0900 Subject: [PATCH] Update create-jira-issue.yml --- .github/workflows/create-jira-issue.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml index 6bad18e..1b37b5e 100644 --- a/.github/workflows/create-jira-issue.yml +++ b/.github/workflows/create-jira-issue.yml @@ -43,6 +43,20 @@ jobs: ${{ github.event.issue.body }} mode: md2jira + - name: Load User Mapping + id: load-mapping + run: | + JIRA_EMAIL=$(echo '${{ secrets.USER_MAPPING }}' | jq -r --arg login ${{ github.event.issue.user.login }} '.[$login]') + if [ -z "$JIRA_EMAIL" ]; then + echo "No mapping found for user ${{ github.event.issue.user.login }}. Assignee will be empty." + fi + echo "jira_email=$JIRA_EMAIL" >> $GITHUB_ENV + + - name: Log Assignee Information + run: | + echo "GitHub User: ${{ steps.load-mapping.outputs.github_user }}" + echo "Jira Assignee Email: ${{ steps.load-mapping.outputs.jira_email }}" + - name: Create Issue id: create uses: atlassian/gajira-create@v3 @@ -51,6 +65,7 @@ jobs: issuetype: SubTask summary: '${{ github.event.issue.title }}' description: '${{ steps.md2jira.outputs.output-text }}' + assignee: '${{ env.jira_email }}' fields: | { "parent": {