[DEV-85] [Feature] Langgraph 챗봇 구현 #1
This file contains hidden or 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
| permissions: | |
| issues: write | |
| name: Create Jira issue | |
| on: | |
| issues: | |
| types: | |
| - opened | |
| jobs: | |
| create-issue: | |
| name: Create Jira issue | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Login | |
| uses: atlassian/gajira-login@v3 | |
| env: | |
| JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | |
| JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | |
| JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | |
| - name: Checkout main code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Set Issue Data Based on Title | |
| id: set-data | |
| shell: bash | |
| run: | | |
| ISSUE_TITLE="${{ github.event.issue.title }}" | |
| echo "Detected issue title: $ISSUE_TITLE" | |
| if echo "$ISSUE_TITLE" | grep -iq '\[Bug\]'; then | |
| echo "ISSUE_TYPE=버그" >> $GITHUB_ENV | |
| echo "TEMPLATE_PATH=.github/ISSUE_TEMPLATE/bug-form.yml" >> $GITHUB_ENV | |
| echo "Bug issue detected based on title." | |
| elif echo "$ISSUE_TITLE" | grep -iq '\[Feature\]'; then | |
| echo "ISSUE_TYPE=작업" >> $GITHUB_ENV | |
| echo "TEMPLATE_PATH=.github/ISSUE_TEMPLATE/feature-form.yml" >> $GITHUB_ENV | |
| echo "Feature issue detected based on title." | |
| elif echo "$ISSUE_TITLE" | grep -iq '\[Refactor\]'; then | |
| echo "ISSUE_TYPE=작업" >> $GITHUB_ENV | |
| echo "TEMPLATE_PATH=.github/ISSUE_TEMPLATE/refactor-form.yml" >> $GITHUB_ENV | |
| echo "Refactor issue detected based on title." | |
| elif echo "$ISSUE_TITLE" | grep -iq '\[Chore\]'; then | |
| echo "ISSUE_TYPE=작업" >> $GITHUB_ENV | |
| echo "TEMPLATE_PATH=.github/ISSUE_TEMPLATE/chore-form.yml" >> $GITHUB_ENV | |
| echo "Chore issue detected based on title." | |
| else | |
| echo "ISSUE_TYPE=작업" >> $GITHUB_ENV | |
| echo "TEMPLATE_PATH=.github/ISSUE_TEMPLATE/feature-form.yml" >> $GITHUB_ENV | |
| echo "No specific issue type detected. Defaulting to Feature settings." | |
| fi | |
| - name: Issue Parser | |
| uses: stefanbuck/github-issue-praser@v3 | |
| id: issue-parser | |
| with: | |
| template-path: ${{ env.TEMPLATE_PATH }} | |
| - name: Log Issue Parser | |
| run: | | |
| echo '${{ steps.issue-parser.outputs.issueparser_parentKey }}' | |
| echo '${{ steps.issue-parser.outputs.__ticket_number }}' | |
| echo '${{ steps.issue-parser.outputs.jsonString }}' | |
| - name: Convert markdown to Jira Syntax | |
| uses: peter-evans/jira2md@v1 | |
| id: md2jira | |
| with: | |
| input-text: | | |
| ### Github Issue Link | |
| - ${{ github.event.issue.html_url }} | |
| ${{ github.event.issue.body }} | |
| mode: md2jira | |
| - name: Create Issue | |
| id: create | |
| uses: atlassian/gajira-create@v3 | |
| with: | |
| project: DEV | |
| issuetype: ${{ env.ISSUE_TYPE }} | |
| summary: '${{ github.event.issue.title }}' | |
| description: '${{ steps.md2jira.outputs.output-text }}' | |
| fields: | | |
| { | |
| "parent": { | |
| "key": "${{ steps.issue-parser.outputs.issueparser_parentKey }}" | |
| } | |
| } | |
| - name: Log created issue | |
| run: echo "Jira Issue ${{ steps.issue-parser.outputs.parentKey }}/${{ steps.create.outputs.issue }} was created" | |
| - name: Update issue title | |
| uses: actions-cool/issues-helper@v3 | |
| with: | |
| actions: 'update-issue' | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| title: '[${{ steps.create.outputs.issue }}] ${{ github.event.issue.title }}' | |
| - name: Add comment with Jira issue link | |
| uses: actions-cool/issues-helper@v3 | |
| with: | |
| actions: 'create-comment' | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| issue-number: ${{ github.event.issue.number }} | |
| body: 'Jira Issue Created: [${{ steps.create.outputs.issue }}](${{ secrets.JIRA_BASE_URL }}/browse/${{ steps.create.outputs.issue }})' |