forked from SteamWar/SteamWar
@@ -127,7 +127,7 @@ jobs:
|
||||
failures=()
|
||||
for target_branch in "${version_branches[@]}"; do
|
||||
safe_target="$(sed -E 's#[^A-Za-z0-9._-]+#-#g; s#^-+##; s#-+$##' <<< "$target_branch")"
|
||||
head_branch="backport/pr-${pr_number}-to-${safe_target}"
|
||||
head_branch="backport-pr-${pr_number}-to-${safe_target}"
|
||||
|
||||
existing_pr="$(api GET "${repo_path}/pulls?state=open&base_branch=$(jq -rn --arg value "$target_branch" '$value|@uri')&limit=50" |
|
||||
jq -r --arg head "$head_branch" '.[] | select(.head.ref == $head) | .number' |
|
||||
@@ -188,7 +188,6 @@ jobs:
|
||||
-o "topic=${head_branch}" \
|
||||
-o "title=Backport #${pr_number} to ${target_branch}: ${pr_title}" \
|
||||
-o "description=${description}" \
|
||||
-o "force-push" \
|
||||
origin "HEAD:refs/for/${target_branch}"
|
||||
echo "Created backport PR from ${head_branch} to ${target_branch}."
|
||||
git checkout main
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
name: Merge backport
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: ${{ startsWith(github.event.pull_request.base.ref, 'version/') && startsWith(github.event.pull_request.head.ref, 'backport/pr-') }}
|
||||
if: ${{ startsWith(github.event.pull_request.base.ref, 'version/') && startsWith(github.event.pull_request.head.ref, 'backport-pr-') }}
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2025 SteamWar.de-Serverteam
|
||||
* Copyright (C) 2026 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
|
||||
Reference in New Issue
Block a user