Commit 07cb8b07 authored by Diego Salazar's avatar Diego Salazar

Merge branch 'allow-overriding-gitlab_url' into 'master'

proposals: allow overriding 'gitlab_url' for fr/wp/cp projects

See merge request !11
parents 5102a512 52f534f8
...@@ -52,7 +52,7 @@ class ProcessProposals extends Command ...@@ -52,7 +52,7 @@ class ProcessProposals extends Command
} }
if (basename($filename) != $filename) { if (basename($filename) != $filename) {
continue; continue;
} }
$result[$filename] = $request->web_url; $result[$filename] = $request->web_url;
} }
...@@ -109,7 +109,7 @@ class ProcessProposals extends Command ...@@ -109,7 +109,7 @@ class ProcessProposals extends Command
} }
if (!isset($mergedMrFilenameToUrlMap[$filename])) { if (!isset($mergedMrFilenameToUrlMap[$filename])) {
$this->error("Project $filename: failed to find matching merged MR"); $this->error("Project $filename: failed to find matching merged MR");
$gitlab_url = null; $gitlab_url = null;
} else { } else {
$gitlab_url = htmlspecialchars($mergedMrFilenameToUrlMap[$filename], ENT_QUOTES); $gitlab_url = htmlspecialchars($mergedMrFilenameToUrlMap[$filename], ENT_QUOTES);
} }
...@@ -123,6 +123,10 @@ class ProcessProposals extends Command ...@@ -123,6 +123,10 @@ class ProcessProposals extends Command
$this->info("Updating project $filename"); $this->info("Updating project $filename");
} }
if (isset($detail['values']['gitlab_url'])) {
$project->gitlab_url = htmlspecialchars($detail['values']['gitlab_url'], ENT_QUOTES);
}
$project->author = $author; $project->author = $author;
$project->state = $state; $project->state = $state;
$project->target_amount = $amount; $project->target_amount = $amount;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment