From 3c6525bbaab55460ed5720068a7108d078fc7b65 Mon Sep 17 00:00:00 2001 From: ChristophShyper <45788587+ChristophShyper@users.noreply.github.com> Date: Fri, 12 Jun 2026 18:04:44 +0200 Subject: [PATCH 1/2] fix(workflows): target repository default branch for auto PRs Pass github.event.repository.default_branch to action-pull-request in the reusable auto-pull-request workflow so repositories using main, master, or a different default branch create PRs against the correct base branch. This makes the shared auto-PR flow fork-safe for repositories that consume the reusable workflow. --- Taskfile.variables.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Taskfile.variables.yml b/Taskfile.variables.yml index f1ca7f1..632dd39 100644 --- a/Taskfile.variables.yml +++ b/Taskfile.variables.yml @@ -38,7 +38,21 @@ vars: DOCKER_NAME: '{{.DOCKER_ORG_NAME}}/{{.DOCKER_IMAGE}}' GITHUB_NAME: '{{.GITHUB_ORG_NAME}}/{{.GITHUB_REPO}}' GHRC_NAME: ghcr.io/{{.GITHUB_ORG_NAME}}/{{.GITHUB_REPO}} - DEFAULT_BRANCH: master + DEFAULT_BRANCH: + sh: | + if [ -n "${DEFAULT_BRANCH:-}" ]; then + printf "%s\n" "${DEFAULT_BRANCH}" + elif branch_ref="$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null)"; then + printf "%s\n" "${branch_ref#origin/}" + elif current_branch="$(git symbolic-ref --quiet --short HEAD 2>/dev/null)" && { [ "${current_branch}" = "main" ] || [ "${current_branch}" = "master" ]; }; then + printf "%s\n" "${current_branch}" + elif git show-ref --verify --quiet refs/heads/main || git show-ref --verify --quiet refs/remotes/origin/main; then + echo main + elif git show-ref --verify --quiet refs/heads/master || git show-ref --verify --quiet refs/remotes/origin/master; then + echo master + else + echo master + fi VERSION_FROM_ACTION_YML: sh: 'grep "image: docker://{{.DOCKER_NAME}}:" action.yml 2>/dev/null | cut -d ":" -f 4' AUTHOR_FROM_ACTION_YML: From 934320a9afe80f6ab25da9d08890cd16397a6ab2 Mon Sep 17 00:00:00 2001 From: ChristophShyper <45788587+ChristophShyper@users.noreply.github.com> Date: Sun, 14 Jun 2026 20:13:17 +0200 Subject: [PATCH 2/2] fix(action): default organization domain at runtime Apply a shell-level default for INPUT_ORGANIZATION_DOMAIN so direct docker execution behaves the same way as the action input definition. This prevents malformed origin URLs in image-mode e2e runs when the variable is omitted and keeps github.com as the effective default. --- entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 4832355..21dde83 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,6 +5,8 @@ set -eo pipefail # Return code RET_CODE=0 +INPUT_ORGANIZATION_DOMAIN="${INPUT_ORGANIZATION_DOMAIN:-github.com}" + echo "Inputs:" echo " add_timestamp: ${INPUT_ADD_TIMESTAMP}" echo " amend: ${INPUT_AMEND}"