Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-07-27 13:40:07 +0300
committerBadlop <badlop@process-one.net>2022-07-27 16:16:51 +0300
commitbc8050eb03453b4c1b221394a95ec0aac406f803 (patch)
treed79a7257c620237748b152adfa9e222d3d63abc5 /src
parenta38ed7fb2c79e849ddb0767fe7c3ad38afdd74b0 (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 df2d0c676..7058cd7ac 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"),