From e43dfdbaf81524fea0a2efb16f4100d18b48b301 Mon Sep 17 00:00:00 2001 From: pombas_n Date: Wed, 30 Sep 2026 11:19:02 +0200 Subject: [PATCH] Add readme.md --- readme.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e817bfd --- /dev/null +++ b/readme.md @@ -0,0 +1,31 @@ +# Create Gitea Pull Request + +Opens a pull request on Gitea. Use this after your workflow has already **pushed a branch**. This action does not change git; it only tells Gitea “merge this branch into that one”. + +**Before this step:** commit your changes and `git push` the source branch. + +```yaml +- uses: https://gitea.psi.ch/pombas_n/pullrequest@main + id: pr + with: + token: ${{ secrets.GITHUB_TOKEN }} # needs permission to create pull requests + repository: linux/WebHosting_DMZ # owner/repo; omit to use this workflow's repo + title: Fix markdown typos # what people see in the PR list + body: Automated typo fixes. # optional description + head: typos # branch that has the changes (already pushed) + base: master # branch you want to merge into +``` + +Then you can print the result: + +```yaml +- run: echo "${{ steps.pr.outputs.html_url }}" +``` + +`head` is the branch with the work. `base` is the target. For a fork use `owner:branch` as `head`. + +If an open PR for the same `head` → `base` already exists, the action reuses it instead of failing. Set `allow_existing: "false"` if you want a failure instead. + +Optional: `gitea_url` (default `https://gitea.psi.ch`). + +Outputs: `number`, `url` (API), `html_url` (browser).