25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Don't bother with COMMIT.json user-friendly feature in automated user case

This commit is contained in:
Badlop 2022-07-27 12:40:07 +02:00
parent a38ed7fb2c
commit bc8050eb03

View File

@ -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"),