diff --git a/docker-compose.yml b/docker-compose.yml index f584e159..dad41ae3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -99,6 +99,7 @@ services: networks: - backend environment: + LOCAL_DEVELOPMENT: "true" DEBUG_TOOLBAR: "false" env_file: - .env diff --git a/docs/commands.md b/docs/commands.md index c54c77da..fddff569 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -307,6 +307,8 @@ If both the `--release` and the `--library-name` are passed, the command will lo **Purpose**: Execute a chain of commands which are necessary to run during a release. Imports new versions, beta versions, slack messages, github issues, commits, authors, maintainers, etc... Inspect the management command to see exactly which commands are being run. +For this to work `SLACK_BOT_API` must be set in the `.env` file. + **Example** ```bash diff --git a/docs/env_vars.md b/docs/env_vars.md index 87926dc3..13997f7e 100644 --- a/docs/env_vars.md +++ b/docs/env_vars.md @@ -79,3 +79,6 @@ This project uses environment variables to configure certain aspects of the appl ### `MAX_CELERY_CONNECTIONS` - If set, will set the maximum number of connections to the Celery in `settings.py`. Defaults to 60. + +### `SLACK_BOT_TOKEN` +- Used to authenticate with the Slack API for pulling data for release reports. diff --git a/env.template b/env.template index b66072ce..4cbdf717 100644 --- a/env.template +++ b/env.template @@ -54,7 +54,8 @@ GITHUB_OAUTH_CLIENT_SECRET= GOOGLE_OAUTH_CLIENT_ID= GOOGLE_OAUTH_CLIENT_SECRET= -SLACK_BOT_TOKEN=changeme +# optional, needed to run reports +SLACK_BOT_TOKEN= DEBUG_TOOLBAR=True # uncomment whichever is appropriate for your editor # currently only pycharm is supported, vscode kept for example of alternative options diff --git a/libraries/management/commands/release_tasks.py b/libraries/management/commands/release_tasks.py index 174ee8bf..d54906e1 100644 --- a/libraries/management/commands/release_tasks.py +++ b/libraries/management/commands/release_tasks.py @@ -32,6 +32,8 @@ def progress_message(message: str): @locked(1138692) def run_commands(progress: list[str]): + if not settings.SLACK_BOT_TOKEN: + raise ValueError("SLACK_BOT_TOKEN is not set.") handled_commits = {} progress.append(progress_message("Importing versions...")) call_command("import_versions", "--new")