https://github.com/cssnr/create-pull-action
Easily create a Pull Request from a GitHub Action.
https://github.com/cssnr/create-pull-action
github-actions
Last synced: 4 months ago
JSON representation
Easily create a Pull Request from a GitHub Action.
- Host: GitHub
- URL: https://github.com/cssnr/create-pull-action
- Owner: cssnr
- License: mit
- Created: 2026-01-09T22:19:55.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2026-01-10T02:41:47.000Z (5 months ago)
- Last Synced: 2026-01-11T00:19:18.611Z (5 months ago)
- Topics: github-actions
- Language: TypeScript
- Homepage: https://actions.cssnr.com
- Size: 289 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/cssnr/create-pull-action/tags)
[](https://github.com/cssnr/create-pull-action/releases)
[](https://github.com/cssnr/create-pull-action/releases/latest)
[](https://github.com/cssnr/create-pull-action/blob/master/src)
[](https://github.com/cssnr/create-pull-action/actions/workflows/release.yaml)
[](https://github.com/cssnr/create-pull-action/actions/workflows/test.yaml)
[](https://github.com/cssnr/create-pull-action/actions/workflows/lint.yaml)
[](https://sonarcloud.io/summary/new_code?id=cssnr_create-pull-action)
[](https://github.com/cssnr/create-pull-action/pulse)
[](https://codeberg.org/cssnr/create-pull-action)
[](https://github.com/cssnr/create-pull-action/graphs/contributors)
[](https://github.com/cssnr/create-pull-action?tab=readme-ov-file#readme)
[](https://github.com/cssnr/create-pull-action)
[](https://github.com/cssnr/create-pull-action/discussions)
[](https://github.com/cssnr/create-pull-action/forks)
[](https://github.com/cssnr/create-pull-action/stargazers)
[](https://cssnr.github.io/)
[](https://discord.gg/wXy6m2X8wY)
[](https://ko-fi.com/cssnr)
# Create Pull Action
- [Features](#Features)
- [Inputs](#Inputs)
- [Permissions](#Permissions)
- [Outputs](#Outputs)
- [Tags](#Tags)
- [Support](#Support)
- [Contributing](#Contributing)
Easily create a Pull Request from a GitHub Action.
This action assumes you have already created a commit in a `head` branch.
All the other [Inputs](#inputs) have defaults.
```yaml
- name: 'Create Pull'
uses: cssnr/create-pull-action@master
with:
head: feature-branch
```
See the [Inputs](#inputs) for more options.
## Features
🚀 Created as an alternative to using the gh cli or api.
- Simple
- Defaults
## Inputs
âś… Only the `head` branch is required.
| Input | Default Value | Input Description |
| :----------- | :---------------------------------------: | :---------------------- |
| `repository` | `github.repository` | Repository `owner/name` |
| `head` | _Required_ | Head Branch |
| `base` | `default_branch` | Base Branch |
| `title` | `Changes from {Name}` | Pull Request Title |
| `body` | `Triggered by {user} in workflow {Name}.` | Pull Request Body |
| `token` | `github.token` | Token for `repository` |
| `summary` | `true` | Add Job Summary |
```yaml
- name: 'Create Pull'
uses: cssnr/create-pull-action@master
with:
repository: some/other-repository # optional
head: feature-branch
base: master # optional
title: Ralf Broke It # optional
body: Broken ${{ github.run_number }} times. # optional
token: ${{ secrets.ACCESS_TOKEN }} # see permissions
```
### Permissions
đź”’ This action requires the following workflow permissions if the `repository` is the same.
```yaml
permissions:
pull-request: write
```
If the workflow is in a different `repository` you need to create an Access Token.
The Personal, Fine-Grained or App Token needs these permissions on the `repository`.
```yaml
permissions:
pull-request: write
contents: read # to determine base branch if private
```
Permissions documentation for [Workflows](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token), [Actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication) and [Apps](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/choosing-permissions-for-a-github-app).
## Outputs
📤 The pull request response data is accessible via outputs.
| Output | Description |
| :--------- | :-------------------- |
| `pull` | Pull Request JSON |
| `html_url` | Pull Request HTML URL |
| `id` | Pull Request ID |
| `number` | Pull Request Number |
Everything is available in the `pull` json. The other outputs are parsed from this object.
```yaml
- name: 'Create Pull Action'
id: pull
uses: cssnr/create-pull-action@master
with:
head: feature-branch
- name: 'Echo Output'
run: |
echo "html_url: ${{ steps.pull.outputs.html_url }}"
echo "html_url: ${{ fromJSON(steps.pull.outputs.pull).html_url }}"
```
## Tags
The following rolling [tags](https://github.com/cssnr/create-pull-action/tags) are maintained.
| Version Tag | Rolling | Bugs | Feat. | Name | Target | Example |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :--: | :---: | :-------: | :------: | :------- |
| [](https://github.com/cssnr/create-pull-action/releases/latest) | âś… | âś… | âś… | **Major** | `vN.x.x` | `vN` |
| [](https://github.com/cssnr/create-pull-action/releases/latest) | ✅ | ✅ | ❌ | **Minor** | `vN.N.x` | `vN.N` |
| [](https://github.com/cssnr/create-pull-action/releases/latest) | ❌ | ❌ | ❌ | **Micro** | `vN.N.N` | `vN.N.N` |
You can view the release notes for each version on the [releases](https://github.com/cssnr/create-pull-action/releases) page.
The **Major** tag is recommended. It is the most up-to-date and always backwards compatible.
Breaking changes would result in a **Major** version bump. At a minimum you should use a **Minor** tag.
# Support
If you run into any issues or need help getting started, please do one of the following:
- Report an Issue:
- Q&A Discussion:
- Request a Feature:
- Chat with us on Discord:
[](https://github.com/cssnr/create-pull-action/issues/new?template=1-feature.yaml)
[](https://github.com/cssnr/create-pull-action/issues)
[](https://github.com/cssnr/create-pull-action/discussions)
[](https://discord.gg/wXy6m2X8wY)
For more information, see the CSSNR [SUPPORT.md](https://github.com/cssnr/.github/blob/master/.github/SUPPORT.md#support).
# Contributing
If you would like to submit a PR, please review the [CONTRIBUTING.md](#contributing-ov-file).
Please consider making a donation to support the development of this project
and [additional](https://cssnr.com/) open source projects.
[](https://ko-fi.com/cssnr)
[](https://actions-tools.cssnr.com/)
Additionally, you can support other [GitHub Actions](https://actions.cssnr.com/) I have published:
- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
- [Portainer Stack Deploy Action](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
- [Docker Context Action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)
- [Actions Up Action](https://github.com/cssnr/actions-up-action?tab=readme-ov-file#readme)
- [Rhysd Actionlint Action](https://github.com/cssnr/actionlint-action?tab=readme-ov-file#readme)
- [Zensical Action](https://github.com/cssnr/zensical-action?tab=readme-ov-file#readme)
- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)
- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)
- [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)
- [TOML Action](https://github.com/cssnr/toml-action?tab=readme-ov-file#readme)
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)
- [JSON Key Value Check Action](https://github.com/cssnr/json-key-value-check-action?tab=readme-ov-file#readme)
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)
- [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)
- [Package Changelog Action](https://github.com/cssnr/package-changelog-action?tab=readme-ov-file#readme)
- [NPM Outdated Check Action](https://github.com/cssnr/npm-outdated-action?tab=readme-ov-file#readme)
- [Label Creator Action](https://github.com/cssnr/label-creator-action?tab=readme-ov-file#readme)
- [Algolia Crawler Action](https://github.com/cssnr/algolia-crawler-action?tab=readme-ov-file#readme)
- [Upload Release Action](https://github.com/cssnr/upload-release-action?tab=readme-ov-file#readme)
- [Check Build Action](https://github.com/cssnr/check-build-action?tab=readme-ov-file#readme)
- [Web Request Action](https://github.com/cssnr/web-request-action?tab=readme-ov-file#readme)
- [Get Commit Action](https://github.com/cssnr/get-commit-action?tab=readme-ov-file#readme)
âť” Unpublished Actions
These actions are not published on the Marketplace, but may be useful.
- [cssnr/create-pull-action](https://github.com/cssnr/create-pull-action?tab=readme-ov-file#readme) - Create a pull request.
- [cssnr/create-files-action](https://github.com/cssnr/create-files-action?tab=readme-ov-file#readme) - Create various files from templates.
- [cssnr/draft-release-action](https://github.com/cssnr/draft-release-action?tab=readme-ov-file#readme) - Keep a draft release ready to publish.
- [cssnr/homebrew-action](https://github.com/cssnr/homebrew-action?tab=readme-ov-file#readme) - Homebrew formula update action.
- [cssnr/env-json-action](https://github.com/cssnr/env-json-action?tab=readme-ov-file#readme) - Convert env file to json or vice versa.
- [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action?tab=readme-ov-file#readme) - Sync files to a remote host with rsync.
- [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action?tab=readme-ov-file#readme) - Update release notes.
- [smashedr/combine-release-notes-action](https://github.com/smashedr/combine-release-notes-action?tab=readme-ov-file#readme) - Combine release notes.
---
📝 Template Actions
These are basic action templates that I use for creating new actions.
- [javascript-action](https://github.com/smashedr/javascript-action?tab=readme-ov-file#readme) - JavaScript
- [typescript-action](https://github.com/smashedr/typescript-action?tab=readme-ov-file#readme) - TypeScript
- [py-test-action](https://github.com/smashedr/py-test-action?tab=readme-ov-file#readme) - Dockerfile Python
- [test-action-uv](https://github.com/smashedr/test-action-uv?tab=readme-ov-file#readme) - Dockerfile Python UV
- [docker-test-action](https://github.com/smashedr/docker-test-action?tab=readme-ov-file#readme) - Docker Image Python
Note: The `docker-test-action` builds, runs and pushes images to [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).
---
For a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)