Download .github/actions/create-pull-request/action.yml from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 1.72 kB
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/.github/actions/create-pull-request/action.yml
- Command line
-
hf download hf://SaylorTwift/gemini-cli/.github/actions/create-pull-request/action.yml
-
curl -L -o action.yml https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/.github/actions/create-pull-request/action.yml
1.72 kB
| name: 'Create Pull Request' | |
| description: 'Creates a pull request.' | |
| inputs: | |
| branch-name: | |
| description: 'The name of the branch to create the PR from.' | |
| required: true | |
| pr-title: | |
| description: 'The title of the pull request.' | |
| required: true | |
| pr-body: | |
| description: 'The body of the pull request.' | |
| required: true | |
| base-branch: | |
| description: 'The branch to merge into.' | |
| required: true | |
| default: 'main' | |
| github-token: | |
| description: 'The GitHub token to use for creating the pull request.' | |
| required: true | |
| dry-run: | |
| description: 'Whether to run in dry-run mode.' | |
| required: false | |
| default: 'false' | |
| working-directory: | |
| description: 'The working directory to run the commands in.' | |
| required: false | |
| default: '.' | |
| runs: | |
| using: 'composite' | |
| steps: | |
| - name: 'Creates a Pull Request' | |
| if: "inputs.dry-run != 'true'" | |
| env: | |
| GH_TOKEN: '${{ inputs.github-token }}' | |
| INPUTS_BRANCH_NAME: '${{ inputs.branch-name }}' | |
| INPUTS_PR_TITLE: '${{ inputs.pr-title }}' | |
| INPUTS_PR_BODY: '${{ inputs.pr-body }}' | |
| INPUTS_BASE_BRANCH: '${{ inputs.base-branch }}' | |
| shell: 'bash' | |
| working-directory: '${{ inputs.working-directory }}' | |
| run: | | |
| set -e | |
| if ! git ls-remote --exit-code --heads origin "${INPUTS_BRANCH_NAME}"; then | |
| echo "::error::Branch '${INPUTS_BRANCH_NAME}' does not exist on the remote repository." | |
| exit 1 | |
| fi | |
| PR_URL=$(gh pr create \ | |
| --title "${INPUTS_PR_TITLE}" \ | |
| --body "${INPUTS_PR_BODY}" \ | |
| --base "${INPUTS_BASE_BRANCH}" \ | |
| --head "${INPUTS_BRANCH_NAME}" \ | |
| --fill) | |
| gh pr merge "$PR_URL" --auto | |