From 98fa974e156acad2596e074eecd36472d4fe168e Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Fri, 13 Feb 2026 22:17:15 +0100 Subject: [PATCH] fix: support fork PRs by making nova repo URL configurable When contributors open PRs from forks, CI fails because rebar.config.script hardcodes novaframework/nova.git as the repo URL. Add nova_repo workflow input and NOVA_REPO env var so the calling workflow can pass the fork's repo URL. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/run_nra.yml | 5 +++++ rebar.config.script | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_nra.yml b/.github/workflows/run_nra.yml index eea6590..4102b6b 100644 --- a/.github/workflows/run_nra.yml +++ b/.github/workflows/run_nra.yml @@ -7,9 +7,14 @@ on: required: true type: string default: main + nova_repo: + required: false + type: string + default: "novaframework/nova" env: NOVA_BRANCH: "${{ inputs.nova_branch }}" + NOVA_REPO: "${{ inputs.nova_repo }}" jobs: run-nra: runs-on: ubuntu-22.04 diff --git a/rebar.config.script b/rebar.config.script index 41860d1..d80eadf 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -1,15 +1,17 @@ Conf0 = CONFIG, NovaBranch = list_to_binary(os:getenv("NOVA_BRANCH", "master")), +NovaRepo = os:getenv("NOVA_REPO", "novaframework/nova"), +RepoUrl = "https://github.com/" ++ NovaRepo ++ ".git", Deps = case NovaBranch of <<"master">> -> {deps, [ - {nova, ".*", {git, "https://github.com/novaframework/nova.git", {branch, "master"}}} + {nova, ".*", {git, RepoUrl, {branch, "master"}}} ]}; <<"refs/tags/", Rest/binary>> -> - {deps, [{nova, ".*", {git, "https://github.com/novaframework/nova.git", {tag, binary_to_list(Rest)}}}]}; + {deps, [{nova, ".*", {git, RepoUrl, {tag, binary_to_list(Rest)}}}]}; NovaBranch -> {deps, [ - {nova, ".*", {git, "https://github.com/novaframework/nova.git", {branch, binary_to_list(NovaBranch)}}} + {nova, ".*", {git, RepoUrl, {branch, binary_to_list(NovaBranch)}}} ]} end, Conf1 = proplists:delete(deps, Conf0),