mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-22 13:56:44 +00:00
Add repository name extraction to action.yml for improved token generation
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
a3afb99979
commit
9edb3d4a80
10
action.yml
10
action.yml
@ -4,6 +4,14 @@ author: "Alastair Mooney"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Extract repository name
|
||||
if: ${{ inputs.TARGET_REPO != '' && inputs.APP_ID != '' }}
|
||||
id: extract-repo
|
||||
run: |
|
||||
REPO_NAME=$(echo "${{ inputs.TARGET_REPO }}" | cut -d'/' -f2)
|
||||
echo "repo-name=$REPO_NAME" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Generate token for private repository access
|
||||
if: ${{ inputs.TARGET_REPO != '' && inputs.APP_ID != '' }}
|
||||
id: generate-token
|
||||
@ -12,7 +20,7 @@ runs:
|
||||
app-id: ${{ inputs.APP_ID }}
|
||||
private-key: ${{ inputs.PRIVATE_KEY }}
|
||||
owner: ${{ inputs.OWNER }}
|
||||
repositories: ${{ inputs.TARGET_REPO != '' && split(inputs.TARGET_REPO, '/')[1] || '' }}
|
||||
repositories: ${{ steps.extract-repo.outputs.repo-name }}
|
||||
|
||||
- name: Run TODO to Issue action
|
||||
uses: docker://reg.dev.krd/test-todo-to-issue/todo-to-issue-action:test
|
||||
|
||||
Loading…
Reference in New Issue
Block a user