Skip to content

Commit

Permalink
docs(readme): use common CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
josselinbuils committed Sep 1, 2023
1 parent ae8a0d9 commit 05104e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 37 deletions.
34 changes: 1 addition & 33 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
## Contributing

Here are listed all the ways you can contribute to the project.

### Issues

If you encounter an issue, you can create a
[Github issue](https://github.com/ManoManoTech/homer/issues/new).

### Develop

#### Necessary environment variables

- **GITLAB_SECRET_TOKEN**: from Gitlab project webhooks, to validate incoming
Gitlab requests.
- **GITLAB_TOKEN**: to interact with the Gitlab API.
- **POSTGRES_HOST**: host of the PostgreSQL database.
- **POSTGRES_PASSWORD**: password used when connecting to the PostgreSQL
database.
- **POSTGRES_PORT**: port where the PostgreSQL database listens.
- **POSTGRES_USER**: username used when connecting to the PostgreSQL database.
- **SLACK_BOT_USER_O_AUTH_ACCESS_TOKEN**: to publish Slack messages.
- **SLACK_SIGNING_SECRET**: to validate incoming Slack requests.

#### Use Ngrok

```bash
ngrok http localhost:3000
```

#### Start the database locally

```bash
docker compose up -d
```
See [Contributing to this repository](https://github.com/ManoManoTech/ALaMano/blob/master/CONTRIBUTING.md).
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,22 @@ Be sure to have all those installed:

Create a `.env` file containing the following variables:

- `GITLAB_SECRET=`
- `GITLAB_SECRET`

This is a user generated secret, so you can put any value.

It will be used later to set up Gitlab webhooks to allow Homer to verify
that Gitlab→Homer calls are authentic.

- `GITLAB_TOKEN=`
- `GITLAB_TOKEN`

If you don't already have one, you need to create a project access token on
Gitlab by following the
[dedicated documentation](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#create-a-project-access-token).

This token allows Homer to use the Gitlab API.

- `SLACK_SIGNING_SECRET=`
- `SLACK_SIGNING_SECRET`

- Go to the [Slack apps page](https://api.slack.com/apps/) of your
organisation.
Expand All @@ -185,7 +185,7 @@ Create a `.env` file containing the following variables:

This secret allows Homer to verify that Slack→Homer calls are authentic.

- `SLACK_BOT_USER_O_AUTH_ACCESS_TOKEN=`
- `SLACK_BOT_USER_O_AUTH_ACCESS_TOKEN`

- Go to the [Slack apps page](https://api.slack.com/apps/) of your
organisation.
Expand All @@ -198,6 +198,14 @@ Create a `.env` file containing the following variables:

![OAuth token](docs/assets/slack/oauth-token.png)

If you want Homer to connect to an **external PostgreSQL database**, you can set
the following variables:

- `POSTGRES_HOST`: host of the database.
- `POSTGRES_PASSWORD`: password used when connecting to the database.
- `POSTGRES_PORT`: port where the database listens.
- `POSTGRES_USER`: username used when connecting to the database.

### 5. Install and run

```bash
Expand Down

0 comments on commit 05104e8

Please sign in to comment.