diff options
author | zeripath <art27@cantab.net> | 2023-01-31 22:10:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 22:10:54 +0000 |
commit | f1f0430f9fd731310713ad723bed9618bcd53cda (patch) | |
tree | 9dab2a38d43eae400828d0b2866c07fff5622534 /CONTRIBUTING.md | |
parent | 519939fa8c325bf2112286a652fed3256051b260 (diff) | |
download | gitea-f1f0430f9fd731310713ad723bed9618bcd53cda.tar.gz gitea-f1f0430f9fd731310713ad723bed9618bcd53cda.zip |
Add Contributed backport command (#22643)
This PR provides a contributed backport command to help create backports
for Gitea.
It represents a significant improvement on my previously described
shell-script.
It can be installed using `go install contrib/backport/backport.go`.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fbf2a331dd..7a23448e0a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -267,26 +267,10 @@ with the rest of the summary matching the original PR. Similarly for frontports --- -The below is a script that may be helpful in creating backports. YMMV. +A command to help create backports can be found in `contrib/backport` and can be installed (from inside the gitea repo root directory) using: ```bash -#!/bin/sh -PR="$1" -SHA="$2" -VERSION="$3" - -if [ -z "$SHA" ]; then - SHA=$(gh api /repos/go-gitea/gitea/pulls/$PR -q '.merge_commit_sha') -fi - -if [ -z "$VERSION" ]; then - VERSION="v1.16" -fi - -echo git checkout origin/release/"$VERSION" -b backport-$PR-$VERSION -git checkout origin/release/"$VERSION" -b backport-$PR-$VERSION -git cherry-pick $SHA && git commit --amend && git push zeripath backport-$PR-$VERSION && xdg-open https://github.com/go-gitea/gitea/compare/release/"$VERSION"...zeripath:backport-$PR-$VERSION - +go install contrib/backport/backport.go ``` ## Developer Certificate of Origin (DCO) |