Skip to content
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

dev: promote to production v0.3 #337

Merged
merged 151 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
c60e771
chore: update all backend dependencies to the latest version
pablohashescobar Feb 1, 2023
c4fff45
feat: manual ordering for issues in kanban
pablohashescobar Feb 2, 2023
8b1bf53
refactor: issues folder structure
aaryan610 Feb 2, 2023
b2eab80
refactor: modules and states folder structure
aaryan610 Feb 2, 2023
563921d
refactor: datepicker code
aaryan610 Feb 2, 2023
4f85773
fix: create issue modal bug
aaryan610 Feb 2, 2023
aa805b2
feat: custom progress bar added
AnmolBhatia1001 Feb 2, 2023
58eda65
refactor: created global component for kanban board
aaryan610 Feb 3, 2023
a4f095f
refactor: update cycle and module issue create
pablohashescobar Feb 3, 2023
7207d92
refactor: return modules created
pablohashescobar Feb 3, 2023
85b7f39
refactor: integrated global kanban view everywhere
aaryan610 Feb 4, 2023
d673aed
refactor: integrated global list view everywhere
aaryan610 Feb 5, 2023
0e07c1e
refactor: removed unnecessary api calls
aaryan610 Feb 5, 2023
eec82ec
refactor: update nomenclature for consistency
pablohashescobar Feb 6, 2023
adbe16f
refactor: global select component for issue view
aaryan610 Feb 6, 2023
67a1052
refactor: track cycles and modules for issue
pablohashescobar Feb 6, 2023
c7e006d
Merge pull request #232 from makeplane/refactor/folder_structure
sriramveeraghanta Feb 6, 2023
e1b7e8d
Merge pull request #233 from makeplane/feat/progress_bar
sriramveeraghanta Feb 6, 2023
a576a2a
fix: tracking new cycles and modules in activities
pablohashescobar Feb 6, 2023
0b7f064
feat: segregate api token workspace
pablohashescobar Feb 6, 2023
f69b76c
fix: workpsace id during token creation
pablohashescobar Feb 6, 2023
cd41a05
refactor: update model association to cascade on delete
pablohashescobar Feb 6, 2023
21e042c
feat: sentry integrated (#235)
aaryan610 Feb 6, 2023
d256472
Merge pull request #241 from makeplane/feat/api_token_workspace
pablohashescobar Feb 6, 2023
aaaf75c
Merge pull request #239 from makeplane/refactor/color_nomenclature
pablohashescobar Feb 6, 2023
b93abb4
fix: update remirror description to save empty string and empty parag…
pablohashescobar Feb 6, 2023
c7ad9f3
Merge pull request #236 from makeplane/refactor/cycle_modules
pablohashescobar Feb 6, 2023
2c4dbc8
Merge pull request #231 from makeplane/feat/issue_manual_ordering
pablohashescobar Feb 6, 2023
240be69
Update README.md
sphynxux Feb 6, 2023
f308fe2
Merge pull request #242 from makeplane/sphynxux-patch-1
sphynxux Feb 6, 2023
32d83ac
fix: description and comment_json default value to remove warnings
pablohashescobar Feb 6, 2023
859fef2
feat: link option in remirror (#240)
aaryan610 Feb 7, 2023
8872f3f
feat: module and cycle settings under project
pablohashescobar Feb 7, 2023
f09c9b6
fix: module issue assignment
pablohashescobar Feb 7, 2023
8801a29
fix: module issue updation and activity logging
pablohashescobar Feb 7, 2023
51b3815
fix: typo while creating module issues
pablohashescobar Feb 7, 2023
1d44071
fix: string comparison for update operation
pablohashescobar Feb 7, 2023
d5bf1f7
fix: ui fixes (#246)
anmolsinghbhatia Feb 7, 2023
343718c
fix: update empty passwords to hashed string and add hashing for magi…
pablohashescobar Feb 7, 2023
d36e8af
refactor: remove print logs from back migrations
pablohashescobar Feb 7, 2023
27849ee
build(deps): bump django in /apiserver/requirements
dependabot[bot] Feb 7, 2023
e77defc
chore: update django version to 3.2.17
pablohashescobar Feb 7, 2023
5785ab9
Merge pull request #248 from makeplane/fix/password_empty
pablohashescobar Feb 7, 2023
a676901
Merge pull request #245 from makeplane/fix/module_issue
pablohashescobar Feb 7, 2023
8e1ba90
Merge pull request #244 from makeplane/feat/module_cycle_settings
pablohashescobar Feb 7, 2023
4e27e93
Merge pull request #243 from makeplane/fix/description_comment_migrat…
pablohashescobar Feb 7, 2023
76cc634
feat: cycles and modules toggle in settings, refactor: folder structu…
aaryan610 Feb 8, 2023
d3b73dc
release: Stage Release (#251)
sriramveeraghanta Feb 8, 2023
c978632
feat: sidebar progress (#252)
anmolsinghbhatia Feb 8, 2023
166520d
feat: label grouping, fix: new states response (#254)
aaryan610 Feb 8, 2023
bd399d6
sentry changes (#255)
sriramveeraghanta Feb 8, 2023
8e3541b
fix: mutation of states (#256)
aaryan610 Feb 8, 2023
4ffa31f
fix: create issue modal bugs (#257)
aaryan610 Feb 8, 2023
56030b1
fix: github auth login (#250)
venplane Feb 8, 2023
7f406ce
fix: merge conflicts resolved
sriramveeraghanta Feb 8, 2023
394c738
Merge pull request #259 from makeplane/stage-release-develop
sriramveeraghanta Feb 8, 2023
a94a3e2
Merge pull request #260 from makeplane/stage-release
sriramveeraghanta Feb 8, 2023
605ab26
Merge pull request #261 from makeplane/develop
sriramveeraghanta Feb 8, 2023
9e9a6f4
feat: record issue completed at date when the issues are moved to fom…
pablohashescobar Feb 9, 2023
7c06be1
feat: cycle status (#265)
anmolsinghbhatia Feb 9, 2023
37c28b2
chore: update python runtime
pablohashescobar Feb 9, 2023
a403c0c
feat: label grouping in dropdowns, default state in project settings …
aaryan610 Feb 10, 2023
af22dc9
fix: remirror buttons (#267)
aaryan610 Feb 10, 2023
bb4ffec
feat: burndown chart (#268)
anmolsinghbhatia Feb 10, 2023
0a88b3e
fix: state reordering (#269)
aaryan610 Feb 13, 2023
d0afa48
feat: drag and drop an issue to delete (#270)
aaryan610 Feb 13, 2023
ebf294a
feat : cycle sidebar revamp (#271)
anmolsinghbhatia Feb 13, 2023
8fb34fe
feat : sidebar progress improvement (#272)
anmolsinghbhatia Feb 13, 2023
214e860
chore: removed minor bugs (#273)
aaryan610 Feb 13, 2023
c6f0990
fix: ui bug (#274)
anmolsinghbhatia Feb 13, 2023
97ffdc8
feat: default state for project (#264)
pablohashescobar Feb 13, 2023
7a3c00a
Merge pull request #226 from makeplane/chore/backend_dependencies
pablohashescobar Feb 13, 2023
0477db6
build: add channels requirement for the asgi configuration (#225)
pablohashescobar Feb 13, 2023
af1d49b
refactor: combine sign in and sign up endpoint to a single endpoint (…
pablohashescobar Feb 13, 2023
92d5749
feat: state grouping and ordering list (#253)
pablohashescobar Feb 13, 2023
7950f19
dev: added migrations for new models schema changes
vamsi Feb 13, 2023
9c8c7f1
fix: mac text copy fix (#277)
anmolsinghbhatia Feb 14, 2023
e53ff4c
feat: state description in settings (#275)
aaryan610 Feb 14, 2023
fcba332
refactor: update django admin panel heading (#276)
pablohashescobar Feb 14, 2023
c9dce08
feat: assign multiple sub issues
pablohashescobar Feb 14, 2023
6f0539f
feat: create label option in create issue modal (#281)
aaryan610 Feb 14, 2023
b8c1305
fix: error validation for empty length
pablohashescobar Feb 14, 2023
9a5d7b1
Merge branch 'develop' of github.com:makeplane/plane into feat/multip…
pablohashescobar Feb 14, 2023
ab0ce2f
refactor: issue details page (#282)
aaryan610 Feb 15, 2023
9b51a91
fix: shortcut search (#283)
anmolsinghbhatia Feb 15, 2023
f21135d
feat: module sidebar date and status updated (#285)
anmolsinghbhatia Feb 15, 2023
ec37bb9
feat: bulk assign sub-issues (#284)
aaryan610 Feb 15, 2023
2d2751c
fix: state ordering in group
pablohashescobar Feb 15, 2023
667dafb
fix: consistent dropdowns, refactor: ui components (#286)
aaryan610 Feb 16, 2023
6ed5c05
build(deps): bump django in /apiserver/requirements (#289)
dependabot[bot] Feb 16, 2023
a28be95
fix: workspace name and breadcrumb title , refactor: command palette …
anmolsinghbhatia Feb 16, 2023
1665863
feat: copy link option (#292)
anmolsinghbhatia Feb 17, 2023
4b06839
fix: remirror image not updating (#294)
aaryan610 Feb 17, 2023
a66b2fd
feat: resend login magic code (#291)
dakshesh14 Feb 17, 2023
7c1f357
feat: issue links (#288)
pablohashescobar Feb 17, 2023
45319d8
fix: default label color (#295)
aaryan610 Feb 17, 2023
8c39717
fix: ui changes (#297)
anmolsinghbhatia Feb 17, 2023
a0d176c
refractor: use local storage hook (#293)
dakshesh14 Feb 17, 2023
c979599
fix: assignee and labels field while editing an issue (#296)
aaryan610 Feb 17, 2023
fcb932d
fix: issue title resizing fix (#300)
anmolsinghbhatia Feb 17, 2023
d71cf56
fix: try/catch for invalid values stored in local storage (#301)
dakshesh14 Feb 17, 2023
11a36b4
fix: create issue modal closing on clicking on Grammarly recommendati…
dakshesh14 Feb 17, 2023
393638c
style: not showing pointer & theme color on resend code button disabl…
dakshesh14 Feb 17, 2023
2505417
feat: updated issue grouping and filtering
pablohashescobar Feb 18, 2023
eba0f02
feat: back migration script to populate random sort_order values
pablohashescobar Feb 18, 2023
236c660
feat: sort order during create
pablohashescobar Feb 18, 2023
495ac0c
feat: improved grouper with grouping function
pablohashescobar Feb 18, 2023
d50cc14
fix: typo in model aggregation key
pablohashescobar Feb 18, 2023
77c319c
fix: new project issues response (#303)
aaryan610 Feb 18, 2023
e5934e0
refactor/cycles_folder_structure (#304)
aaryan610 Feb 20, 2023
2020965
fix: ui changes (#306)
anmolsinghbhatia Feb 20, 2023
818fe3e
feat: manual ordering of issues (#305)
aaryan610 Feb 20, 2023
33e2986
feat: global component for links list (#307)
aaryan610 Feb 21, 2023
bdca84b
Feat: Dockerizing using nginx reverse proxy (#280)
sriramveeraghanta Feb 21, 2023
3d28cde
feat: edit module (#309)
anmolsinghbhatia Feb 21, 2023
8c15a15
refactor: dnd function (#308)
aaryan610 Feb 21, 2023
8d6a357
refactor: manual ordering bugs (#312)
aaryan610 Feb 21, 2023
c0263ac
refactor: create issue modal input fields (#310)
aaryan610 Feb 21, 2023
5cbb3ec
style: showing user sign-in progress on sign-in with code (#311)
dakshesh14 Feb 21, 2023
1b94c7b
Merge pull request #314 from makeplane/develop
sriramveeraghanta Feb 21, 2023
71f9ae4
feat: created_by details for links (#313)
pablohashescobar Feb 21, 2023
a904c4a
Merge pull request #302 from makeplane/feat/issue_sorting_grouping
pablohashescobar Feb 21, 2023
33ed2f6
Merge pull request #287 from makeplane/fix/state_ordering
pablohashescobar Feb 21, 2023
f17ecd5
Merge pull request #278 from makeplane/feat/multiple_sub_issues
pablohashescobar Feb 21, 2023
2cadb37
env fixes (#316)
sriramveeraghanta Feb 21, 2023
d8c10b6
feat: issues tooltip , fix: ui improvement (#317)
anmolsinghbhatia Feb 22, 2023
d29f345
fix : tooltip fix (#318)
anmolsinghbhatia Feb 22, 2023
c1a78cc
fix: redirection after login (#320)
dakshesh14 Feb 22, 2023
a9802f8
feat: github integration (#315)
pablohashescobar Feb 22, 2023
937222f
feat: assignee and label details in cycle and module issues (#319)
pablohashescobar Feb 22, 2023
2fffad1
Merge branch 'master' of https://github.com/makeplane/plane into develop
vamsi Feb 22, 2023
649748f
Merge branch 'develop' of https://github.com/makeplane/plane into dev…
vamsi Feb 22, 2023
702cfeb
dev: added new migrations
vamsi Feb 22, 2023
92f7179
fix: minor bugs and ux improvements (#322)
aaryan610 Feb 23, 2023
ad5a8be
Merge pull request #323 from makeplane/develop
sriramveeraghanta Feb 23, 2023
6a10fac
feat: made new multi-level select listbox (#326)
dakshesh14 Feb 23, 2023
4caa4e3
fix: ui improvements (#327)
anmolsinghbhatia Feb 23, 2023
1e63c5b
style: added direction for multi-level drop-down (#328)
dakshesh14 Feb 23, 2023
a550f4b
refractor: added proper types to getServerSideProps context (#321)
dakshesh14 Feb 23, 2023
98d4473
fix: issue view not updating order_by value (#324)
dakshesh14 Feb 23, 2023
2b3cb83
environmental example variables fixes (#330)
sriramveeraghanta Feb 23, 2023
36a733c
style: github integration ui (#329)
aaryan610 Feb 23, 2023
69e8b50
fix: ui fix (#331)
anmolsinghbhatia Feb 23, 2023
946dddb
fix: kanban assignees tooltip (#332)
anmolsinghbhatia Feb 23, 2023
443c187
feat: sidebar select option truncate (#334)
anmolsinghbhatia Feb 23, 2023
b53b0bc
fix: create issue modal close on escape click (#333)
dakshesh14 Feb 23, 2023
b4c4271
style: kanban dropdowns, github integration loaders
aaryan610 Feb 23, 2023
90c913c
fix: merge conflicts
aaryan610 Feb 23, 2023
517600a
fix: add filter for workspace integrations (#325)
pablohashescobar Feb 23, 2023
3c67528
Merge pull request #335 from makeplane/style/ui_consistency
vamsi Feb 23, 2023
397a3ce
Merge pull request #336 from makeplane/develop
vamsi Feb 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
root: true,
// This tells ESLint to load the config from the package `config`
// extends: ["custom"],
// This tells ESLint to load the config from the package `eslint-config-custom`
extends: ["custom"],
settings: {
next: {
rootDir: ["apps/*/"],
rootDir: ["apps/*"],
},
},
};
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,11 @@ yarn-error.log
*.sln
package-lock.json
.vscode

# Sentry
.sentryclirc

# lock files
package-lock.json
pnpm-lock.yaml
pnpm-workspace.yaml
116 changes: 116 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
FROM node:18-alpine AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app

RUN yarn global add turbo
COPY . .

RUN turbo prune --scope=app --docker

# Add lockfile and package.json's of isolated subworkspace
FROM node:18-alpine AS installer


RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/yarn.lock ./yarn.lock
RUN yarn install

# Build the project
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json

RUN yarn turbo run build --filter=app


FROM python:3.11.1-alpine3.17 AS backend

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1

WORKDIR /code

RUN apk --update --no-cache add \
"libpq~=15" \
"libxslt~=1.1" \
"nodejs-current~=19" \
"xmlsec~=1.2" \
"nginx" \
"nodejs" \
"npm" \
"supervisor"

COPY apiserver/requirements.txt ./
COPY apiserver/requirements ./requirements
RUN apk add libffi-dev
RUN apk --update --no-cache --virtual .build-deps add \
"bash~=5.2" \
"g++~=12.2" \
"gcc~=12.2" \
"cargo~=1.64" \
"git~=2" \
"make~=4.3" \
"postgresql13-dev~=13" \
"libc-dev" \
"linux-headers" \
&& \
pip install -r requirements.txt --compile --no-cache-dir \
&& \
apk del .build-deps

# Add in Django deps and generate Django's static files
COPY apiserver/manage.py manage.py
COPY apiserver/plane plane/
COPY apiserver/templates templates/

COPY apiserver/gunicorn.config.py ./
RUN apk --update --no-cache add "bash~=5.2"
COPY apiserver/bin ./bin/

RUN chmod +x ./bin/takeoff ./bin/worker
RUN chmod -R 777 /code

# Expose container port and run entry point script
EXPOSE 8000
EXPOSE 3000
EXPOSE 80



WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 plane
RUN adduser --system --uid 1001 captain

COPY --from=installer /app/apps/app/next.config.js .
COPY --from=installer /app/apps/app/package.json .

COPY --from=installer --chown=captain:plane /app/apps/app/.next/standalone ./

COPY --from=installer --chown=captain:plane /app/apps/app/.next/static ./apps/app/.next/static

ENV NEXT_TELEMETRY_DISABLED 1

# RUN rm /etc/nginx/conf.d/default.conf
#######################################################################
COPY nginx/nginx-single-docker-image.conf /etc/nginx/http.d/default.conf
#######################################################################

COPY nginx/supervisor.conf /code/supervisor.conf


CMD ["supervisord","-c","/code/supervisor.conf"]




4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</p>

<p align="center">
<a href="https://discord.com/invite/29tPNhaV">
<a href="https://discord.com/invite/A92xrEGCge">
<img alt="Discord" src="https://img.shields.io/discord/1031547764020084846?color=5865F2&label=Discord&style=for-the-badge" />
</a>
<img alt="Discord" src="https://img.shields.io/github/commit-activity/m/makeplane/plane?style=for-the-badge" />
Expand Down Expand Up @@ -48,4 +48,4 @@ Our [Code of Conduct](https://github.com/makeplane/plane/blob/master/CODE_OF_CON

## Security

If you believe you have found a security vulnerability in Plane, we encourage you to responsibly disclose this and not open a public issue. We will investigate all legitimate reports. Email security@plane.so to disclose any security vulnerabilities.
If you believe you have found a security vulnerability in Plane, we encourage you to responsibly disclose this and not open a public issue. We will investigate all legitimate reports. Email security@plane.so to disclose any security vulnerabilities.
20 changes: 12 additions & 8 deletions apiserver/.env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Backend
SECRET_KEY="<-- django secret -->"
DJANGO_SETTINGS_MODULE="plane.settings.production"
# Database
DATABASE_URL=postgres://plane:plane@plane-db-1:5432/plane
# Cache
REDIS_URL=redis://redis:6379/
# SMPT
EMAIL_HOST="<-- email smtp -->"
EMAIL_HOST_USER="<-- email host user -->"
EMAIL_HOST_PASSWORD="<-- email host password -->"

# AWS
AWS_REGION="<-- aws region -->"
AWS_ACCESS_KEY_ID="<-- aws access key -->"
AWS_SECRET_ACCESS_KEY="<-- aws secret acess key -->"
AWS_S3_BUCKET_NAME="<-- aws s3 bucket name -->"

SENTRY_DSN="<-- sentry dsn -->"
WEB_URL="<-- frontend web url -->"

# FE
WEB_URL="localhost/"
# OAUTH
GITHUB_CLIENT_SECRET="<-- github secret -->"

# Flags
DISABLE_COLLECTSTATIC=1
DOCKERIZED=0 //True if running docker compose else 0
DOCKERIZED=1
19 changes: 10 additions & 9 deletions apiserver/Dockerfile.api
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.14-alpine3.16 AS backend
FROM python:3.11.1-alpine3.17 AS backend

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
Expand All @@ -8,19 +8,19 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK=1
WORKDIR /code

RUN apk --update --no-cache add \
"libpq~=14" \
"libpq~=15" \
"libxslt~=1.1" \
"nodejs-current~=18" \
"nodejs-current~=19" \
"xmlsec~=1.2"

COPY requirements.txt ./
COPY requirements ./requirements
RUN apk add libffi-dev
RUN apk --update --no-cache --virtual .build-deps add \
"bash~=5.1" \
"g++~=11.2" \
"gcc~=11.2" \
"cargo~=1.60" \
"bash~=5.2" \
"g++~=12.2" \
"gcc~=12.2" \
"cargo~=1.64" \
"git~=2" \
"make~=4.3" \
"postgresql13-dev~=13" \
Expand All @@ -46,15 +46,16 @@ COPY templates templates/

COPY gunicorn.config.py ./
USER root
RUN apk --update --no-cache add "bash~=5.1"
RUN apk --update --no-cache add "bash~=5.2"
COPY ./bin ./bin/

RUN chmod +x ./bin/takeoff ./bin/worker
RUN chmod -R 777 /code

USER captain

# Expose container port and run entry point script
EXPOSE 8000

CMD [ "./bin/takeoff" ]
# CMD [ "./bin/takeoff" ]

48 changes: 43 additions & 5 deletions apiserver/back_migration.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# All the python scripts that are used for back migrations
import uuid
import random
from django.contrib.auth.hashers import make_password
from plane.db.models import ProjectIdentifier
from plane.db.models import Issue, IssueComment
from plane.db.models import Issue, IssueComment, User


# Update description and description html values for old descriptions
def update_description():
try:

issues = Issue.objects.all()
updated_issues = []

Expand All @@ -25,7 +28,6 @@ def update_description():

def update_comments():
try:

issue_comments = IssueComment.objects.all()
updated_issue_comments = []

Expand All @@ -44,9 +46,11 @@ def update_comments():

def update_project_identifiers():
try:
project_identifiers = ProjectIdentifier.objects.filter(workspace_id=None).select_related("project", "project__workspace")
project_identifiers = ProjectIdentifier.objects.filter(
workspace_id=None
).select_related("project", "project__workspace")
updated_identifiers = []

for identifier in project_identifiers:
identifier.workspace_id = identifier.project.workspace_id
updated_identifiers.append(identifier)
Expand All @@ -58,3 +62,37 @@ def update_project_identifiers():
except Exception as e:
print(e)
print("Failed")


def update_user_empty_password():
try:
users = User.objects.filter(password="")
updated_users = []

for user in users:
user.password = make_password(uuid.uuid4().hex)
user.is_password_autoset = True
updated_users.append(user)

User.objects.bulk_update(updated_users, ["password"], batch_size=50)
print("Success")

except Exception as e:
print(e)
print("Failed")


def updated_issue_sort_order():
try:
issues = Issue.objects.all()
updated_issues = []

for issue in issues:
issue.sort_order = issue.sequence_id * random.randint(100, 500)
updated_issues.append(issue)

Issue.objects.bulk_update(updated_issues, ["sort_order"], batch_size=100)
print("Success")
except Exception as e:
print(e)
print("Failed")
4 changes: 4 additions & 0 deletions apiserver/bin/takeoff
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
set -e
python manage.py wait_for_db
python manage.py migrate

# Create a Default User
python bin/user_script.py

exec gunicorn -w 8 -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --config gunicorn.config.py --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
28 changes: 28 additions & 0 deletions apiserver/bin/user_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import os, sys
import uuid

sys.path.append("/code")

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "plane.settings.production")
import django

django.setup()

from plane.db.models import User


def populate():
default_email = os.environ.get("DEFAULT_EMAIL", "captain@plane.so")
default_password = os.environ.get("DEFAULT_PASSWORD", "password123")

if not User.objects.filter(email=default_email).exists():
user = User.objects.create(email=default_email, username=uuid.uuid4().hex)
user.set_password(default_password)
user.save()
print("User created")

print("Success")


if __name__ == "__main__":
populate()
11 changes: 10 additions & 1 deletion apiserver/plane/api/serializers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,13 @@

from .module import ModuleWriteSerializer, ModuleSerializer, ModuleIssueSerializer

from .api_token import APITokenSerializer
from .api_token import APITokenSerializer

from .integration import (
IntegrationSerializer,
WorkspaceIntegrationSerializer,
GithubIssueSyncSerializer,
GithubRepositorySerializer,
GithubRepositorySyncSerializer,
GithubCommentSyncSerializer,
)
7 changes: 7 additions & 0 deletions apiserver/plane/api/serializers/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .base import IntegrationSerializer, WorkspaceIntegrationSerializer
from .github import (
GithubRepositorySerializer,
GithubRepositorySyncSerializer,
GithubIssueSyncSerializer,
GithubCommentSyncSerializer,
)
Loading