diff --git a/action.yml b/action.yml index e144f12..35193e5 100644 --- a/action.yml +++ b/action.yml @@ -36,5 +36,25 @@ inputs: required: false default: 'To Do' runs: - using: 'docker' - image: 'Dockerfile' + using: composite + steps: + - name: Run GitHub to Jira Sync + working-directory: ${{ github.action_path }} + shell: bash + run: | + pip3 install -r requirements.txt + REPOSITORY_NAME="$(echo "$GITHUB_REPOSITORY" | cut -d/ -f 2)" + ./gh2jira sync \ + --gh-url "$GITHUB_API_URL" \ + --gh-token "${{ inputs.github_token }}" \ + --gh-org "$GITHUB_REPOSITORY_OWNER" \ + --gh-repo "$REPOSITORY_NAME" \ + --jira-url "${{ inputs.jira_url }}" \ + --jira-user "${{ inputs.jira_user }}" \ + --jira-token "${{ inputs.jira_token }}" \ + --jira-project "${{ inputs.jira_project }}" \ + --jira-labels "${{ inputs.jira_labels }}" \ + --direction "${{ inputs.sync_direction }}" \ + --issue-end-state "${{ inputs.issue_end_state }}" \ + --issue-reopen-state "${{ inputs.issue_reopen_state }}" \ + --state-issue - diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..45ef7fe --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +flask~=2.0.0 +requests~=2.26.0 +jira~=3.0.0