Skip to content

v.1.0.0 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,4 @@ FORBID_REDIRECTION=false
# ENABLE_SUBTASKS_BY_DEFAULT: This environment variable is used to enable or disable the execution of subtasks.
# The format is as follows: plugin_name1:subtask_name1:enabled_value,plugin_name2:subtask_name2:enabled_value,plugin_name3:subtask_name3:enabled_value
##########################
# ENABLE_SUBTASKS_BY_DEFAULT="jira:collectIssueChangelogs:true,jira:extractIssueChangelogs:true,jira:convertIssueChangelogs:true,tapd:collectBugChangelogs:true,tapd:extractBugChangelogs:true,tapd:convertBugChangelogs:true,zentao:collectBugRepoCommits:true,zentao:extractBugRepoCommits:true,zentao:convertBugRepoCommits:true,zentao:collectStoryRepoCommits:true,zentao:extractStoryRepoCommits:true,zentao:convertStoryRepoCommits:true,zentao:collectTaskRepoCommits:true,zentao:extractTaskRepoCommits:true,zentao:convertTaskRepoCommits:true"

##########################
# Set JIRA_JQL_AUTO_FULL_REFRESH to 'true' to enable automatic full refresh of the Jira plugin when JQL changes
##########################
JIRA_JQL_AUTO_FULL_REFRESH=true
# ENABLE_SUBTASKS_BY_DEFAULT="jira:collectIssueChangelogs:true,jira:extractIssueChangelogs:true,jira:convertIssueChangelogs:true,tapd:collectBugChangelogs:true,tapd:extractBugChangelogs:true,tapd:convertBugChangelogs:true,zentao:collectBugRepoCommits:true,zentao:extractBugRepoCommits:true,zentao:convertBugRepoCommits:true,zentao:collectStoryRepoCommits:true,zentao:extractStoryRepoCommits:true,zentao:convertStoryRepoCommits:true,zentao:collectTaskRepoCommits:true,zentao:extractTaskRepoCommits:true,zentao:convertTaskRepoCommits:true"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider moving sample configuration to a template file
The long commented example for ENABLE_SUBTASKS_BY_DEFAULT in .env can make the live env file noisy. It’s better practice to keep .env focused on actual values and move samples or examples into a .env.example (or documentation) so that users can clearly see which variables need setting without clutter.

🤖 Prompt for AI Agents
In the .env file at line 71, the long commented example for
ENABLE_SUBTASKS_BY_DEFAULT should be removed to reduce clutter. Move this sample
configuration to a separate .env.example file or documentation, keeping the .env
file clean and focused only on actual environment variable values that need to
be set.

24 changes: 10 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@ services:
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: lake
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_USER: merico
MYSQL_PASSWORD: merico
Comment on lines +26 to +29
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

⚠️ Potential issue

Avoid hardcoding database credentials in plaintext
Embedding admin, merico etc. directly in docker-compose.yml is a security risk and reduces flexibility across environments. Consider restoring environment variable interpolation or leveraging Docker secrets. For example:

 services:
   mysql:
     environment:
-      MYSQL_ROOT_PASSWORD: admin
+      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
       MYSQL_DATABASE: lake
-      MYSQL_USER: merico
-      MYSQL_PASSWORD: merico
+      MYSQL_USER: ${MYSQL_USER}
+      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
       TZ: UTC

This way, you can define actual values in .env (or in your CI/CD secret store) without committing them.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: lake
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_USER: merico
MYSQL_PASSWORD: merico
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: lake
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
🤖 Prompt for AI Agents
In docker-compose.yml around lines 26 to 29, database credentials are hardcoded
in plaintext, which is insecure and inflexible. Replace the hardcoded values
with environment variable references using the ${VAR_NAME} syntax, and define
these variables in a separate .env file or use Docker secrets for better
security and environment flexibility.

TZ: UTC
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET}
command: --character-set-server=utf8mb4
--collation-server=utf8mb4_bin
--skip-log-bin

grafana:
image: devlake.docker.scarf.sh/apache/devlake-dashboard:v1.0.1
image: devlake.docker.scarf.sh/apache/devlake-dashboard:v1.0.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

🛠️ Refactor suggestion

Use env vars for Grafana DB credentials & remove trailing whitespace
Similar to MySQL, hardcoding merico for MYSQL_USER/MYSQL_PASSWORD in the Grafana service should be avoided. Also, line 36 has trailing spaces. You could refactor:

 services:
   grafana:
-    image: devlake.docker.scarf.sh/apache/devlake-dashboard:v1.0.0   
+    image: devlake.docker.scarf.sh/apache/devlake-dashboard:v1.0.0
     ports:
@@
     environment:
       GF_SERVER_ROOT_URL: "http://localhost:4000/grafana"
       GF_USERS_DEFAULT_THEME: "light"
       MYSQL_URL: mysql:3306
       MYSQL_DATABASE: lake
-      MYSQL_USER: merico
-      MYSQL_PASSWORD: merico
+      MYSQL_USER: ${MYSQL_USER}
+      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
       TZ: UTC

This maintains consistency and centralizes secret management.

Also applies to: 46-47

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 36-36: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In docker-compose.yml at line 36 and also lines 46-47, avoid hardcoding Grafana
DB credentials like MYSQL_USER and MYSQL_PASSWORD directly in the file. Instead,
replace these values with environment variables to centralize secret management
and improve security. Additionally, remove any trailing whitespace on line 36 to
keep the file clean and consistent.

ports:
- 3002:3000
volumes:
Expand All @@ -44,16 +43,15 @@ services:
GF_USERS_DEFAULT_THEME: "light"
MYSQL_URL: mysql:3306
MYSQL_DATABASE: lake
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_USER: merico
MYSQL_PASSWORD: merico
TZ: UTC
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET}
restart: always
depends_on:
- mysql

devlake:
image: devlake.docker.scarf.sh/apache/devlake:v1.0.1
image: devlake.docker.scarf.sh/apache/devlake:v1.0.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove trailing whitespace from image tag
Line 54’s image declaration ends with extraneous spaces. Cleaning up these trailing spaces keeps the YAML clean and prevents potential lint errors:

-    image: devlake.docker.scarf.sh/apache/devlake:v1.0.0   
+    image: devlake.docker.scarf.sh/apache/devlake:v1.0.0
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 54-54: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In docker-compose.yml at line 54, remove the trailing whitespace characters
after the image tag "devlake.docker.scarf.sh/apache/devlake:v1.0.0" to ensure
the YAML is clean and avoid potential linting issues.

ports:
- 8080:8080
restart: always
Expand All @@ -64,12 +62,11 @@ services:
environment:
LOGGING_DIR: /app/logs
TZ: UTC
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET}
depends_on:
- mysql

config-ui:
image: devlake.docker.scarf.sh/apache/devlake-config-ui:v1.0.1
image: devlake.docker.scarf.sh/apache/devlake-config-ui:v1.0.0
ports:
- 4000:4000
env_file:
Expand All @@ -78,9 +75,8 @@ services:
DEVLAKE_ENDPOINT: devlake:8080
GRAFANA_ENDPOINT: grafana:3000
TZ: UTC
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET}
ADMIN_USER: ${ADMIN_USER}
ADMIN_PASS: ${ADMIN_PASS}
#ADMIN_USER: devlake
#ADMIN_PASS: merico
depends_on:
- devlake

Expand Down