Skip to content

Commit 7841277

Browse files
authored
Improve the docs for using GCP to clarify the project-ID and fix a broken command. (#291)
* Improve the docs for using GCP. Signed-off-by: Caleb Brown <[email protected]> * Improve the README.md files to help new users. Signed-off-by: Caleb Brown <[email protected]> * Update go.work.sum... Signed-off-by: Caleb Brown <[email protected]> --------- Signed-off-by: Caleb Brown <[email protected]>
1 parent 34a5b90 commit 7841277

File tree

3 files changed

+147
-100
lines changed

3 files changed

+147
-100
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ open source project:
4747

4848
## Usage
4949

50-
The program only requires one argument to run, the name of the repo:
51-
5250
```shell
5351
$ go install github.com/ossf/criticality_score/cmd/criticality_score@latest
5452

55-
$ criticality_score github.com/kubernetes/kubernetes
53+
$ export GITHUB_TOKEN=... # requires a GitHub token to work
54+
$ gcloud auth login --update-adc # optional, add -depsdev-disable to skip
55+
56+
$ criticality_score -gcp-project-id=[your projectID] github.com/kubernetes/kubernetes
5657
repo.name: kubernetes
5758
repo.url: https://github.com/kubernetes/kubernetes
5859
repo.language: Go

cmd/criticality_score/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ The input of this tool could by the output of the `enumerate_github` tool.
99

1010
```shell
1111
$ export GITHUB_TOKEN=ghp_x # Personal Access Token Goes Here
12-
$ gcloud login --update-adc # Sign-in to GCP
12+
$ gcloud auth login --update-adc # Sign-in to GCP
1313
$ criticality_score \
1414
-workers=1 \
1515
-out=signals.csv \
1616
-format=csv \
17+
-gcp-project-id=x \
1718
github_projects.txt
1819
```
1920

@@ -61,6 +62,9 @@ $ export GITHUB_TOKEN=ghp_abc,ghp_123
6162

6263
#### GCP Authentication
6364

65+
Google Cloud Platform authentication is required to collect dependent counts
66+
using deps.dev data. This can be skipped if `-depsdev-disable` is passed in.
67+
6468
BigQuery access requires the "BigQuery User" (`roles/bigquery.user`) role added
6569
to the account used, or be an "Owner".
6670

@@ -121,7 +125,9 @@ fail.
121125
122126
#### Google Cloud Platform flags
123127
124-
- `-gcp-project-id string` the Google Cloud Project ID to use. Auto-detects by default.
128+
- `-gcp-project-id string` the Google Cloud Project ID to use. Auto-detects by
129+
default. If auto-detect fails an error containing the message "unable to
130+
detect projectID" will be shown, and this flag will need to be set.
125131
126132
#### deps.dev Collection Flags
127133
@@ -229,4 +235,4 @@ Pass in a single repo to quickly test signal collection, for example:
229235
$ go run ./cmd/criticality_score \
230236
-log=debug \
231237
https://github.com/django/django
232-
```
238+
```

0 commit comments

Comments
 (0)