Skip to content

Commit 98fa974

Browse files
Taureclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 5709084 commit 98fa974

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/run_nra.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ on:
77
required: true
88
type: string
99
default: main
10+
nova_repo:
11+
required: false
12+
type: string
13+
default: "novaframework/nova"
1014

1115
env:
1216
NOVA_BRANCH: "${{ inputs.nova_branch }}"
17+
NOVA_REPO: "${{ inputs.nova_repo }}"
1318
jobs:
1419
run-nra:
1520
runs-on: ubuntu-22.04

rebar.config.script

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
Conf0 = CONFIG,
22

33
NovaBranch = list_to_binary(os:getenv("NOVA_BRANCH", "master")),
4+
NovaRepo = os:getenv("NOVA_REPO", "novaframework/nova"),
5+
RepoUrl = "https://github.com/" ++ NovaRepo ++ ".git",
46

57
Deps = case NovaBranch of
68
<<"master">> -> {deps, [
7-
{nova, ".*", {git, "https://github.com/novaframework/nova.git", {branch, "master"}}}
9+
{nova, ".*", {git, RepoUrl, {branch, "master"}}}
810
]};
911
<<"refs/tags/", Rest/binary>> ->
10-
{deps, [{nova, ".*", {git, "https://github.com/novaframework/nova.git", {tag, binary_to_list(Rest)}}}]};
12+
{deps, [{nova, ".*", {git, RepoUrl, {tag, binary_to_list(Rest)}}}]};
1113
NovaBranch -> {deps, [
12-
{nova, ".*", {git, "https://github.com/novaframework/nova.git", {branch, binary_to_list(NovaBranch)}}}
14+
{nova, ".*", {git, RepoUrl, {branch, binary_to_list(NovaBranch)}}}
1315
]}
1416
end,
1517
Conf1 = proplists:delete(deps, Conf0),

0 commit comments

Comments
 (0)