Skip to content

Commit 3f19c26

Browse files
committed
update README
1 parent 1aa8ee4 commit 3f19c26

2 files changed

Lines changed: 33 additions & 8 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ configure:
1313
read -p "Enter JIT API client ID: " client_id; \
1414
read -p "Enter JIT API client secret: " client_secret; \
1515
read -p "Enter GitHub Personal token (PAT): " github_token; \
16-
read -p "Enter topic wildcards to exclude(example: *dev*): " topics_to_exclude; \
16+
read -p "Enter comma separated topic wildcards to exclude the creation of teams(example: *dev*, *test*): " topics_to_exclude; \
1717
echo "ORGANIZATION_NAME=$$org_name" > .env; \
1818
echo "JIT_CLIENT_ID=$$client_id" >> .env; \
1919
echo "JIT_CLIENT_SECRET=$$client_secret" >> .env; \

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ jit-customer-scripts/
3737
- Git
3838

3939
## Generating API Keys
40-
* To generate Github Personal Access Token(PAT) refer to this [guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic)
41-
* To generate a Jit API Key Go to Settings -> Users & Permissions -> API Tokens in your Jit [dashboard](https://platform.jit.io).
40+
41+
* To generate Github Personal Access Token(PAT) refer to
42+
this [guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic)
43+
* To generate a Jit API Key Go to Settings -> Users & Permissions -> API Tokens in your
44+
Jit [dashboard](https://platform.jit.io).
4245

4346
## Installation
4447

@@ -88,23 +91,29 @@ make create-teams
8891

8992
This command is a convenience utility that extracts the teams to generate from Github topics. \
9093
It runs these commands:
94+
9195
```bash
9296
python src/utils/github_topics_to_json_file.py
9397
python src/scripts/create_teams.py teams.json
9498
```
9599

96-
This command will fetch the repository names and topics from the GitHub API and generate the JSON file. And then it will create the teams and update the assets.
100+
This command will fetch the repository names and topics from the GitHub API and generate the JSON file. And then it will
101+
create the teams and update the assets.
97102

98103
### Using External JSON File
99104

100-
You can also provide a JSON file containing team details using a command line argument directly. The JSON file should have the following structure:
105+
You can also provide a JSON file containing team details using a command line argument directly. The JSON file should
106+
have the following structure:
101107

102108
```json
103109
{
104110
"teams": [
105111
{
106112
"name": "Team 1",
107-
"members": ["user1", "user2"],
113+
"members": [
114+
"user1",
115+
"user2"
116+
],
108117
"resources": [
109118
{
110119
"type": "{resource_type}",
@@ -118,7 +127,10 @@ You can also provide a JSON file containing team details using a command line ar
118127
},
119128
{
120129
"name": "Team 2",
121-
"members": ["user3", "user4"],
130+
"members": [
131+
"user3",
132+
"user4"
133+
],
122134
"resources": [
123135
{
124136
"type": "{resource_type}",
@@ -138,6 +150,19 @@ python scripts/create_teams.py path/to/teams.json
138150

139151
Replace `path/to/teams.json` with the actual path to your JSON file.
140152

153+
## Excluding Topics
154+
155+
You can exclude certain topics from being considered when creating teams. \
156+
To exclude topics, you could add them in the `make configure` command or update this env var in
157+
the `.env` file: `TEAM_WILDCARD_TO_EXCLUDE`.
158+
159+
For example, to exclude topics that contain the word "test", you can set the variable as follows:
160+
161+
TEAM_WILDCARD_TO_EXCLUDE=*test*
162+
163+
This will exclude topics with names like "test", "test123", and "abc-testing".
164+
141165
## Development
142166

143-
To override Jit's API endpoint, you can set the `JIT_API_ENDPOINT` environment variable. If the variable is not set, the default value will be used.
167+
To override Jit's API endpoint, you can set the `JIT_API_ENDPOINT` environment variable. If the variable is not set, the
168+
default value will be used.

0 commit comments

Comments
 (0)