Skip to content

Commit

Permalink
fix: Add an environment variable for gitlab url
Browse files Browse the repository at this point in the history
  • Loading branch information
fleboulch committed May 13, 2024
1 parent b1ed5b7 commit 5c4ab29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ POSTGRES_PORT=54320
POSTGRES_USER=root
SLACK_BOT_USER_O_AUTH_ACCESS_TOKEN=SLACK_BOT_USER_O_AUTH_ACCESS_TOKEN
SLACK_SIGNING_SECRET=SLACK_SIGNING_SECRET
GITLAB_URL=https://git.manomano.tech
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ Create a `.env` file containing the following variables:

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

- `GITLAB_URL`

The gitlab url of your organization

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

Expand Down
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { GitlabMergeRequestState } from '@/core/typings/GitlabMergeRequest';
import { getEnvVariable } from '@/core/utils/getEnvVariable';

export const CHANNEL_NOT_FOUND_SLACK_ERROR = 'channel_not_found';
export const EXPIRED_TRIGGER_ID_ERROR_MESSAGE =
'D’oh! It looks like I took too much time to respond for Slack, could you retry your command? :homer-donut:';
export const EXPIRED_TRIGGER_ID_SLACK_ERROR = 'expired_trigger_id';
export const GENERIC_ERROR_MESSAGE =
"D'oh! Something went wrong :homer-stressed: You will probably find more information on the error on <https://app.datadoghq.eu/logs?cols=host%2Cservice&live=true&messageDisplay=inline&query=service%3A%2Ahomer%2A%20%40env%3Asupport&index=%2A&stream_sort=desc|Datadog>.";
export const GITLAB_URL = 'https://git.manomano.tech';
export const GITLAB_URL = getEnvVariable('GITLAB_URL');
export const HOMER_GITLAB_URL = `${GITLAB_URL}/tools/homer`;
export const HTTP_STATUS_NO_CONTENT = 204;
export const HTTP_STATUS_OK = 200;
Expand Down

0 comments on commit 5c4ab29

Please sign in to comment.