Skip to content

Commit d9206e7

Browse files
author
jguerreiro
committed
chore(srcfingerprint): standardize call
1 parent c019557 commit d9206e7

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

README.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,70 +10,50 @@ It supports 3 main on premise version control service:
1010
- Gitlab CE and EE
1111
- Bitbucket
1212

13-
## Use the package
14-
15-
- Build binary
16-
```sh
17-
go build ./cmd/src-fingerprint
18-
```
19-
- Set env var `VCS_TOKEN` to the GitHub Token or GitLab Token
20-
```sh
21-
export VCS_TOKEN="<token>"
22-
```
23-
- Run and read doc
24-
```sh
25-
./src-fingerprint
26-
```
27-
- Run on a given user/group
28-
```sh
29-
./src-fingerprint --provider github --object Uber
30-
./src-fingerprint --provider-url http://gitlab.example.com --provider gitlab --object Groupe
31-
```
32-
3313
## Providers
3414

3515
### GitHub
3616

3717
1. Export all file SHAs from a GitHub Org with private repositories to a file with logs:
3818

3919
```sh
40-
env VCS_TOKEN="<token>" ./src-fingerprint -v --output file_shas_collected_dna.json --provider github --object GitGuardian
20+
env VCS_TOKEN="<token>" src-fingerprint -v --output file_shas_collected_dna.json --provider github --object GitGuardian
4121
```
4222

4323
2. Export all file SHAs of every repository the user can access to `stdout`:
4424

4525
```sh
46-
env VCS_TOKEN="<token>" ./src-fingerprint -v --provider github GitGuardian
26+
env VCS_TOKEN="<token>" src-fingerprint -v --provider github GitGuardian
4727
```
4828

4929
### GitLab
5030

5131
1. Export all file SHAs from a GitLab group with private projects to a file with logs:
5232

5333
```sh
54-
env VCS_TOKEN="<token>" ./src-fingerprint -v --output file_shas_collected_dna.json --provider gitlab --object "GitGuardian-dev-group"
34+
env VCS_TOKEN="<token>" src-fingerprint -v --output file_shas_collected_dna.json --provider gitlab --object "GitGuardian-dev-group"
5535
```
5636

5737
2. Export all file SHAs of every project the user can access to `stdout`:
5838

5939
> :warning: On `gitlab.com` this will attempt to retrieve all repositories on `gitlab.com`
6040
6141
```sh
62-
env VCS_TOKEN="<token>" ./src-fingerprint -v --provider gitlab
42+
env VCS_TOKEN="<token>" src-fingerprint -v --provider gitlab
6343
```
6444

6545
### Bitbucket server (formely Atlassian Stash)
6646

6747
1. Export all file SHAs from a Bitbucket project with private repository to a file with logs:
6848

6949
```sh
70-
env VCS_TOKEN="<token>" ./src-fingerprint -v --output file_shas_collected_dna.json --provider bitbucket --object "GitGuardian Project"
50+
env VCS_TOKEN="<token>" src-fingerprint -v --output file_shas_collected_dna.json --provider bitbucket --object "GitGuardian Project"
7151
```
7252

7353
2. Export all file SHAs of every repository the user can access to `stdout`:
7454

7555
```sh
76-
env VCS_TOKEN="<token>" ./src-fingerprint -v --provider bitbucket
56+
env VCS_TOKEN="<token>" src-fingerprint -v --provider bitbucket
7757
```
7858

7959
### Repository
@@ -120,7 +100,33 @@ The gitlab package contains the implementation of the Gitlab Provider.
120100

121101
The cmd/src-fingerprint package contains the binary code. It reads from CLI and environment the configuration and run the Pipeline on an organization.
122102

123-
### Library we use
103+
## Development build and testing
104+
105+
- Build binary
106+
107+
```sh
108+
go build ./cmd/src-fingerprint
109+
```
110+
111+
- Set env var `VCS_TOKEN` to the GitHub Token or GitLab Token
112+
113+
```sh
114+
export VCS_TOKEN="<token>"
115+
```
116+
117+
- Run and read doc
118+
119+
```sh
120+
./src-fingerprint
121+
```
122+
123+
- Run on a given user/group
124+
```sh
125+
./src-fingerprint --provider github --object Uber
126+
./src-fingerprint --provider-url http://gitlab.example.com --provider gitlab --object Groupe
127+
```
128+
129+
### Libraries we use
124130

125131
#### Providers
126132

0 commit comments

Comments
 (0)