Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the query script simpler and more robust
* Use `--get` instead of `-X GET`, as recommended in `curl` docs ( https://curl.se/docs/manpage.html#-X, https://curl.se/docs/manpage.html#-G ) * Set the HTTP header `Accept: application/vnd.github.v3+json`, as recommended throughout the GitHub REST API docs: https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run * Make the actual command simpler and more robust (avoids potential quoting issues, does not attempt to parse JSON output or the URL with `grep` or `sed` which is inherently unreliable and error-prone, etc.), using the approach from https://github.com/hashicorp/terraform-provider-external/blob/v2.2.0/website/docs/data_source.html.md#processing-json-in-shell-scripts * Double-quote all variables according to https://www.shellcheck.net/, see https://github.com/koalaman/shellcheck/wiki/SC2086 * Add newline at end of file
- Loading branch information