summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-07-27 12:40:07 +0200
committerBadlop <badlop@process-one.net>2022-07-27 15:16:51 +0200
commitbc8050eb03453b4c1b221394a95ec0aac406f803 (patch)
treed79a7257c620237748b152adfa9e222d3d63abc5 /src
parentHandle not found COMMIT.json, for example in GH Actions (diff)
Don't bother with COMMIT.json user-friendly feature in automated user case
Diffstat (limited to 'src')
-rw-r--r--src/ext_mod.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ext_mod.erl b/src/ext_mod.erl
index df2d0c67..7058cd7a 100644
--- a/src/ext_mod.erl
+++ b/src/ext_mod.erl
@@ -391,7 +391,7 @@ extract_github_master(Repos, DestDir) ->
ok ->
RepDir = filename:join(DestDir, module_name(Repos)),
file:rename(RepDir++"-master", RepDir),
- write_commit_json(Url, RepDir);
+ maybe_write_commit_json(Url, RepDir);
Error ->
Error
end.
@@ -736,6 +736,14 @@ format({Key, Val}) -> % TODO: improve Yaml parsing
%% -- COMMIT.json
+maybe_write_commit_json(Url, RepDir) ->
+ case (os:getenv("GITHUB_ACTIONS") == "true") of
+ true ->
+ ok;
+ false ->
+ write_commit_json(Url, RepDir)
+ end.
+
write_commit_json(Url, RepDir) ->
Url2 = string_replace(Url, "https://github.com", "https://api.github.com/repos"),
BranchUrl = lists:flatten(Url2 ++ "/branches/master"),