This commit is contained in:
Alvaro Muñoz
2023-03-21 13:14:14 +01:00
2 changed files with 25 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
# gh-mrva # gh-mrva
> This is an unofficial tool and is not officially supported by GitHub.
## Configuration ## Configuration
A configuration file will be created in `~/.config/mrva/config.yml`. The following options are supported: A configuration file will be created in `~/.config/mrva/config.yml`. The following options are supported:
@@ -27,3 +29,26 @@ gh mrva download [--controller <CONTROLLER>] --lang <LANGUAGE> --output-dir <OUT
Note: `controller` is only optionals if defined in the configuration file Note: `controller` is only optionals if defined in the configuration file
Note: if a `name` is provided, the run ID is not necessary and instead `gh-mrva` will download the artifacts associated that `name` as found in the configuration file Note: if a `name` is provided, the run ID is not necessary and instead `gh-mrva` will download the artifacts associated that `name` as found in the configuration file
## Contributing
gh-mrva is a work in progress. If you have ideas for new fixes or improvements, please open an issue or pull request.
If possible, tests should be added for any new fixes. We favour testing with real file systems or processes where possible.
## Releasing
Releasing is currently done via tags. To release a new version, create a new tag and push it to the remote. The release workflow will automatically build and publish the new version.
e.g.
```sh
# Determine the latest tag
git tag -l | sort -V | tail -n 1
# Create a new tag
git tag -a v0.0.2 -m "Release v0.0.2"
# Push the tag to the remote
git push origin --tags
```

View File

@@ -294,7 +294,6 @@ defaultSuite:
// Requests a query to be run against `respositories` on the given `controller`. // Requests a query to be run against `respositories` on the given `controller`.
func submitRun(repoChunk []string, bundle string) (int, error) { func submitRun(repoChunk []string, bundle string) (int, error) {
// See https://github.com/github/github/blob/master/app/api/description/operations/code-scanning/create-variant-analysis.yaml
opts := api.ClientOptions{ opts := api.ClientOptions{
Headers: map[string]string{"Accept": "application/vnd.github.v3+json"}, Headers: map[string]string{"Accept": "application/vnd.github.v3+json"},
} }
@@ -328,7 +327,6 @@ func submitRun(repoChunk []string, bundle string) (int, error) {
} }
func getRunDetails(runId int) (map[string]interface{}, error) { func getRunDetails(runId int) (map[string]interface{}, error) {
// See https://github.com/github/github/blob/master/app/api/description/operations/code-scanning/get-variant-analysis.yaml
opts := api.ClientOptions{ opts := api.ClientOptions{
Headers: map[string]string{"Accept": "application/vnd.github.v3+json"}, Headers: map[string]string{"Accept": "application/vnd.github.v3+json"},
} }
@@ -345,7 +343,6 @@ func getRunDetails(runId int) (map[string]interface{}, error) {
} }
func getRunRepositoryDetails(runId int, nwo string) (map[string]interface{}, error) { func getRunRepositoryDetails(runId int, nwo string) (map[string]interface{}, error) {
// See https://github.com/github/github/blob/master/app/api/description/operations/code-scanning/get-variant-analysis-repo-task.yaml
opts := api.ClientOptions{ opts := api.ClientOptions{
Headers: map[string]string{"Accept": "application/vnd.github.v3+json"}, Headers: map[string]string{"Accept": "application/vnd.github.v3+json"},
} }