Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 authored Feb 14, 2021
1 parent fcd54e9 commit 44a605e
Showing 1 changed file with 37 additions and 34 deletions.
71 changes: 37 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,6 @@ TODO: example screenshot

ArgoCD must be deployed to your cluster.

You need to create either Personal Access Token or GitHub App.

1. Personal Access Token
- Belong to a user
- Share the rate limit in a user
1. GitHub App
- Belong to a user or organization
- Have each rate limit for an installation

#### Option 1: Personal Access Token

Open https://github.com/settings/tokens and generate a new token.

#### Option 2: GitHub App

Create your GitHub App:

- For a user: https://github.com/settings/apps/new?name=argocd-commenter&url=https://github.com/int128/argocd-commenter&webhook_active=false&pull_requests=write
- For an organization: https://github.com/:org/settings/apps/new?name=argocd-commenter&url=https://github.com/int128/argocd-commenter&webhook_active=false&pull_requests=write

[Download a private key of the GitHub App](https://docs.github.com/en/developers/apps/authenticating-with-github-apps).
[Install your GitHub App on your repository or organization](https://docs.github.com/en/developers/apps/installing-github-apps).


### Deploy

Expand All @@ -43,18 +20,44 @@ To deploy the manifest:
kubectl apply -f https://github.com/int128/argocd-commenter/releases/download/v0.2.0/argocd-commenter.yaml
```

If you use your Personal Access Token, create a secret as follows:
You need to create either Personal Access Token or GitHub App.

```shell
kubectl -n argocd-commenter-system create secret generic controller-manager --from-literal="GITHUB_TOKEN=$YOUR_PERSONAL_ACCESS_TOKEN"
```
- Personal Access Token
- Belong to a user
- Share the rate limit in a user
- GitHub App
- Belong to a user or organization
- Have each rate limit for an installation

If you use your GitHub App, create a secret as follows:
#### Option 1: Personal Access Token

```shell
kubectl -n argocd-commenter-system create secret generic controller-manager \
--from-literal="GITHUB_APP_ID=$YOUR_GITHUB_APP_ID" \
--from-literal="GITHUB_APP_INSTALLATION_ID=$YOUR_GITHUB_APP_INSTALLATION_ID" \
--from-file="GITHUB_APP_PRIVATE_KEY=/path/to/your_github_app_private_key.pem"
```
1. Open https://github.com/settings/tokens
1. Generate a new token
1. Create a secret as follows:
```shell
kubectl -n argocd-commenter-system create secret generic controller-manager \
--from-literal="GITHUB_TOKEN=$YOUR_PERSONAL_ACCESS_TOKEN"
```

#### Option 2: GitHub App

1. Create your GitHub App from either link:
- For a user: https://github.com/settings/apps/new?name=argocd-commenter&url=https://github.com/int128/argocd-commenter&webhook_active=false&pull_requests=write
- For an organization: https://github.com/:org/settings/apps/new?name=argocd-commenter&url=https://github.com/int128/argocd-commenter&webhook_active=false&pull_requests=write
1. Get the **App ID** from the setting page
1. [Download a private key of the GitHub App](https://docs.github.com/en/developers/apps/authenticating-with-github-apps)
1. [Install your GitHub App on your repository or organization](https://docs.github.com/en/developers/apps/installing-github-apps)
1. Get the **Installation ID** from the URL, like `https://github.com/settings/installations/ID`
1. Create a secret as follows:
```shell
kubectl -n argocd-commenter-system create secret generic controller-manager \
--from-literal="GITHUB_APP_ID=$YOUR_GITHUB_APP_ID" \
--from-literal="GITHUB_APP_INSTALLATION_ID=$YOUR_GITHUB_APP_INSTALLATION_ID" \
--from-file="GITHUB_APP_PRIVATE_KEY=/path/to/private-key.pem"
```


## Contribution

This is an open source software. Feel free to contribute to it.

0 comments on commit 44a605e

Please sign in to comment.