8000 Improve the docs for using GCP to clarify the project-ID and fix a broken command. by calebbrown · Pull Request #291 · ossf/criticality_score · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve the docs for using GCP to clarify the project-ID and fix a broken command. #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
8000 Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ open source project:

## Usage

The program only requires one argument to run, the name of the repo:

```shell
$ go install github.com/ossf/criticality_score/cmd/criticality_score@latest

$ criticality_score github.com/kubernetes/kubernetes
$ export GITHUB_TOKEN=... # requires a GitHub token to work
$ gcloud auth login --update-adc # optional, add -depsdev-disable to skip

$ criticality_score -gcp-project-id=[your projectID] github.com/kubernetes/kubernetes
repo.name: kubernetes
repo.url: https://github.com/kubernetes/kubernetes
repo.language: Go
Expand Down
12 changes: 9 additions & 3 deletions cmd/criticality_score/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ The input of this tool could by the output of the `enumerate_github` tool.

```shell
$ export GITHUB_TOKEN=ghp_x # Personal Access Token Goes Here
$ gcloud login --update-adc # Sign-in to GCP
$ gcloud auth login --update-adc # Sign-in to GCP
$ criticality_score \
-workers=1 \
-out=signals.csv \
-format=csv \
-gcp-project-id=x \
github_projects.txt
```

Expand Down Expand Up @@ -61,6 +62,9 @@ $ export GITHUB_TOKEN=ghp_abc,ghp_123

#### GCP Authentication

Google Cloud Platform authentication is required to collect dependent counts
using deps.dev data. This can be skipped if `-depsdev-disable` is passed in.

BigQuery access requires the "BigQuery User" (`roles/bigquery.user`) role added
to the account used, or be an "Owner".

Expand Down Expand Up @@ -121,7 +125,9 @@ fail.

#### Google Cloud Platform flags

- `-gcp-project-id string` the Google Cloud Project ID to use. Auto-detects by default.
- `-gcp-project-id string` the Google Cloud Project ID to use. Auto-detects by
default. If auto-detect fails an error containing the message "unable to
detect projectID" will be shown, and this flag will need to be set.

#### deps.dev Collection Flags

Expand Down Expand Up @@ -229,4 +235,4 @@ Pass in a single repo to quickly test signal collection, for example:
$ go run ./cmd/criticality_score \
-log=debug \
https://github.com/django/django
```
```
Loading
0