Forgejo drop-in for peter-evans/create-pull-request: commit changes to a branch, push, and open or update a PR via the Forgejo API.
  • JavaScript 73.4%
  • Shell 20.5%
  • Makefile 6.1%
Find a file
Stephen Way 7355339058
Some checks are pending
test / unit (push) Waiting to run
Repoint references from rasterstate to fjord org
Org migration: the action family now lives under fjord/. Repoints internal repo references (uses:, CI badges, docs, migration guides) at fjord/ and sets the action author to fjord. The old rasterstate copies are left in place.
2026-06-03 16:16:48 -07:00
.forgejo/workflows Initial release: create-pull-request-action 2026-05-31 19:59:53 -07:00
src Initial release: create-pull-request-action 2026-05-31 19:59:53 -07:00
tests Initial release: create-pull-request-action 2026-05-31 19:59:53 -07:00
.gitignore Initial release: create-pull-request-action 2026-05-31 19:59:53 -07:00
action.yml Repoint references from rasterstate to fjord org 2026-06-03 16:16:48 -07:00
CHANGELOG.md Initial release: create-pull-request-action 2026-05-31 19:59:53 -07:00
LICENSE Initial release: create-pull-request-action 2026-05-31 19:59:53 -07:00
Makefile Initial release: create-pull-request-action 2026-05-31 19:59:53 -07:00
MIGRATION.md Repoint references from rasterstate to fjord org 2026-06-03 16:16:48 -07:00
README.md Repoint references from rasterstate to fjord org 2026-06-03 16:16:48 -07:00

Create Pull Request (Forgejo)

Forgejo's peter-evans/create-pull-request. Take the changes in your workspace, commit them to a branch, push, and open or update a pull request, all through the Forgejo API. No github.com.

Part of the Fjord Actions bundle.

Usage

permissions:
  contents: write
  pull-requests: write

jobs:
  bump:
    runs-on: [self-hosted, Linux]
    steps:
      - uses: actions/checkout@v6

      - run: ./scripts/update-deps.sh    # makes whatever changes you want in the tree

      - uses: https://rasterhub.com/fjord/create-pull-request-action@v1
        with:
          branch: deps/weekly
          title: 'chore(deps): weekly bump'
          commit-message: 'chore(deps): weekly bump'
          body: Automated dependency update.
          labels: automated, deps
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}   # a Forgejo token on Forgejo

If there are no changes in the tree, the action is a no-op (pull-request-operation = none). Re-running with the same branch force-updates the branch and updates the existing PR rather than opening a duplicate.

Inputs

Input Default Description
branch create-pull-request/patch Head branch to create/update.
base repo default branch Branch to merge into.
title commit message PR title.
body PR body.
commit-message Automated changes Commit message for the staged changes.
add-paths all (git add -A) Paths to stage, one per line.
labels Labels for a new PR, comma/newline separated (by name).
draft false Open as a draft (WIP: title prefix on Forgejo).
author-name GITHUB_ACTOR Git author/committer name.
author-email Git author/committer email.
path . Working directory of the repo.
token GITHUB_TOKEN env Forgejo token with repo write.
repository GITHUB_REPOSITORY Target repo owner/name.
api_url derived Forgejo API base.

Outputs

Output Description
pull-request-number PR number (empty when there were no changes).
pull-request-url PR web URL.
pull-request-operation created / updated / none.
pull-request-branch Head branch that was pushed.
pull-request-head-sha Commit SHA pushed to the head branch.

Requirements

  • Run after actions/checkout so there's a repo to work in.
  • permissions: contents: write (push the branch) and pull-requests: write (open the PR).

See MIGRATION.md for differences from peter-evans/create-pull-request.

License

MIT, see LICENSE.