Skip to content

Commit 65a03a5

Browse files
committed
Allow the status page branch to be configured by query parameters
1 parent c40a992 commit 65a03a5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

docs/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ <h3>Commit information</h3>
173173
</script>
174174

175175
<script type="text/javascript">
176-
$.getJSON("https://ci.appveyor.com/api/projects/sharwell/Documentationanalyzers/artifacts/DocumentationAnalyzers.Status.json?branch=master&pr=false&stream=true&job=Configuration:%20Release", function (data) {
176+
var urlParams = new URLSearchParams(window.location.search);
177+
var branch = urlParams.get('branch') || 'master';
178+
var pr = urlParams.get('pr') === 'true' ? 'true' : 'false';
179+
$.getJSON(`https://ci.appveyor.com/api/projects/sharwell/Documentationanalyzers/artifacts/DocumentationAnalyzers.Status.json?branch=${branch}&pr=${pr}&stream=true&job=Configuration:%20Release`, function (data) {
177180
$("#renderedDiagnostics").html($.templates($("#diagnostics").html()).render(data));
178181
$("#renderedCommitInfo").html($.templates($("#commitInfo").html()).render(data.git));
179182
});

0 commit comments

Comments
 (0)