From 385c8f48a2530c87bacdc0f347d90b7525b8f3ed Mon Sep 17 00:00:00 2001 From: Alyssa Yu Date: Mon, 8 Aug 2022 16:20:05 -0700 Subject: [PATCH] chore: use the github reusable workflow template from amplitude-typescript repo (#550) --- .github/workflows/jira-issue-create.yml | 46 ++++++++----------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/.github/workflows/jira-issue-create.yml b/.github/workflows/jira-issue-create.yml index 40f44cfb..ae13a80f 100644 --- a/.github/workflows/jira-issue-create.yml +++ b/.github/workflows/jira-issue-create.yml @@ -1,39 +1,21 @@ # Creates jira tickets for new github issues to help triage -name: Jira Issue Creator +name: Jira Issue Creator For JS on: issues: types: [opened] + workflow_call: + inputs: + label: + type: string jobs: - build: - runs-on: ubuntu-18.04 - environment: Jira - name: SDK Bot Jira Issue Creation - steps: - - name: Login - uses: atlassian/gajira-login@master - env: - JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} - JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} - JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} - - - name: Create issue - id: create - uses: atlassian/gajira-create@master - with: - project: ${{ secrets.JIRA_PROJECT }} - issuetype: Task - summary: | - [SDK - JS] ${{ github.event.issue.title }} - description: | - ${{ github.event.issue.html_url }} - fields: '{ - "customfield_10006": 1391, - "customfield_11481": {"value": "Governance 🕵️"}, - "customfield_11200": {"value": "Developer Experience"}, - "labels": ["js"] - }' # sprint, pillar, pod, labels - - - name: Log created issue - run: echo "Issue AMP-${{ steps.create.outputs.issue }} was created" + call-workflow-passing-data: + uses: amplitude/Amplitude-TypeScript/.github/workflows/jira-issue-create-template.yml@main + with: + label: 'JS' + secrets: + JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} + JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} + JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} + JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}