Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Wiesinger <[email protected]>
  • Loading branch information
mowies committed Dec 10, 2024
1 parent ed4a34c commit e5a8759
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions githubgen/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# githubgen

This executable is used to generate the `.github/CODEOWNERS` and `.github/ALLOWLIST` files.
This executable is used to generate the `.github/CODEOWNERS` and
`.github/ALLOWLIST` files.

It reads status metadata from `metadata.yaml` files located throughout the repository.
It reads status metadata from `metadata.yaml` files located throughout the
repository.

It checks that codeowners are known members of the OpenTelemetry organization.

Expand All @@ -11,21 +13,27 @@ It checks that codeowners are known members of the OpenTelemetry organization.
```
$> make gengithub
```

The equivalent of:

```
$> cd cmd/githubgen && $(GOCMD) install .
$> GITHUB_TOKEN=<mypattoken> githubgen --folder . [--allowlist cmd/githubgen/allowlist.txt]
```

## Checking codeowners against OpenTelemetry membership via Github API
## Checking codeowners against OpenTelemetry membership via GitHub API

To authenticate, set the environment variable `GITHUB_TOKEN` to a PAT token. If a PAT is not available you can use the `--skipgithub` flag to avoid checking for membership in the GitHub organization.
To authenticate, set the environment variable `GITHUB_TOKEN` to a PAT token.
If a PAT is not available you can use the `--skipgithub` flag to avoid checking
for membership in the GitHub organization.

For each codeowner, the script will check if the user is registered as a member of the OpenTelemetry organization.
For each codeowner, the script will check if the user is registered as a member
of the OpenTelemetry organization.

If any codeowner is missing, it will stop and print names of missing codeowners.

These can be added to allowlist.txt as a workaround.

If a codeowner is present in allowlist.txt and also a member of the OpenTelemetry organization, the script will error out.
If a codeowner is present in allowlist.txt and also a member of the
OpenTelemetry organization, the script will error out.

0 comments on commit e5a8759

Please sign in to comment.