I've written a custom UI on top of the benchmark data where I load the data using fetch() from raw.githubusercontent.com so I can switch between branches in the UI from a single deployed GitHub Pages site (as GitHub Pages does not support multiple branches).
However, as the data is expected to be loaded via a <script> tag as JavaScript, I need to trim the prefix from the file before parsing it as JSON.
I otherwise use the auto-push functionality, so would rather be able to control the format of the written file, rather than need to handle all that that functionality myself by using the external-data-json-path input.
If there were an input option to set the format between JavaScript and JSON, then I could directly fetch the data as JSON:
- uses: benchmark-action/github-action-benchmark@v1
with:
output-format: json # Optional, default would be javascript as it is today
I've written a custom UI on top of the benchmark data where I load the data using
fetch()
fromraw.githubusercontent.com
so I can switch between branches in the UI from a single deployed GitHub Pages site (as GitHub Pages does not support multiple branches).However, as the data is expected to be loaded via a
<script>
tag as JavaScript, I need to trim the prefix from the file before parsing it as JSON.I otherwise use the auto-push functionality, so would rather be able to control the format of the written file, rather than need to handle all that that functionality myself by using the
external-data-json-path
input.If there were an input option to set the format between JavaScript and JSON, then I could directly fetch the data as JSON:
I'd be happy to contribute a PR to add support for this if such a feature would be welcome.