https://github.com/maxking/forgejo-create-pr
Action for use with Forgejo to commit any changes and create a Pull Request
https://github.com/maxking/forgejo-create-pr
forgejo forgejo-actions
Last synced: 4 months ago
JSON representation
Action for use with Forgejo to commit any changes and create a Pull Request
- Host: GitHub
- URL: https://github.com/maxking/forgejo-create-pr
- Owner: maxking
- License: apache-2.0
- Created: 2024-11-16T13:12:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-08T08:32:06.000Z (over 1 year ago)
- Last Synced: 2025-03-14T03:44:36.017Z (over 1 year ago)
- Topics: forgejo, forgejo-actions
- Homepage:
- Size: 61.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Forgejo Create Pull Request Action
This is a custom action which glues together the right commands to create
a pull request from changes in Forgejo Actions. The existing Github Create
Pull Request action does not work with Forgejo due to incompatibilities in
the API code.
This repo is mostly a mirror of my local copy in private git repo that I
wanted to share with others.
## Usage
Add the following workflow to your repository:
```yaml
name: Create Pull Request
on:
push:
branches:
- feature/** # or your desired branch pattern
jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Pull Request
uses: https://github.com/maxking/forgejo-create-pr@main
with:
# required
token: ${{ secrets.GH_TOKEN }}
# optional
base: 'main'
add-paths: '.'
commit-message: 'feat: automated changes'
pr-title: 'feat: new automated changes'
pr-body: 'This PR contains automated changes'
pr-condition-cmd: 'git status --porcelain'
```
## Inputs
| Input | Description | Required | Default |
|-------|-------------|----------|---------|
| `base` | Base branch to create PR against | Yes | `main` |
| `token` | PAT for creating PR | Yes | - |
| `add-paths` | Paths to add to commit | No | `.` |
| `commit-message` | Commit message | No | `Automated commit` |
| `pr-title` | PR title | No | `Automated PR` |
| `pr-body` | PR body | No | `Automated PR` |
| `pr-condition-cmd` | Command to check if PR should be created | No | `git status --porcelain` |
| `pr-branch` | Branch to create PR against | No | `automated-pr` |
| `commit-user` | Commit user | No | `Forgejo Bot` |
| `commit-email` | Commit email | No | `forgejo@users.noreply.git` |
## License
The code in this repo is licensed under Apache 2.0. See the LICENSE file for details.