Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding username who has PAT[not owner] #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ inputs:
repository:
description: 'Repository name'
required: true
third-user:
description: 'username who inserting his/her PAT'
required: false
access-token:
description: 'PAT with repository scope (https://github.com/settings/tokens)'
required: false
Expand Down Expand Up @@ -47,15 +50,15 @@ runs:
else
if [ -z "${{ inputs.depth }}" ]; then
if [ "${{ inputs.submodule }}" = "true" ]; then
git clone --branch "${{ inputs.branch }}" https://${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git --recursive
git clone --branch "${{ inputs.branch }}" https://${{ inputs.third-user }}:${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git --recursive
else
git clone --branch "${{ inputs.branch }}" https://${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git
git clone --branch "${{ inputs.branch }}" https://${{ inputs.third-user }}:${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git
fi
else
if [ "${{ inputs.submodule }}" = "true" ]; then
git clone --branch "${{ inputs.branch }}" --depth="${{ inputs.depth }}" https://${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git --recursive
git clone --branch "${{ inputs.branch }}" --depth="${{ inputs.depth }}" https://${{ inputs.third-user }}:${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git --recursive
else
git clone --branch "${{ inputs.branch }}" --depth="${{ inputs.depth }}" https://${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git
git clone --branch "${{ inputs.branch }}" --depth="${{ inputs.depth }}" https://${{ inputs.third-user }}:${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git
fi
fi
fi
Expand Down