mirror of
https://github.com/makeplane/plane.git
synced 2025-12-16 11:57:56 +01:00
Add codespell support (config, workflow to detect/not fix) and make it fix some typos (#7864)
* Add github action to codespell preview on push and PRs
* Add rudimentary codespell config
* [DATALAD RUNCMD] chore: run codespell throughout fixing a few typos interactively
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w -i 3 -C 4 ./apps/web/core/components/workspace/delete-workspace-form.tsx ./deployments/cli/community/README.md",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
* Adjust coespell regex to ignore all camelCased words
* [DATALAD RUNCMD] chore: run codespell throughout fixing a few new typos automagically
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
This commit is contained in:
committed by
GitHub
parent
07ff457663
commit
2ca8620246
7
.codespellrc
Normal file
7
.codespellrc
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[codespell]
|
||||||
|
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
|
||||||
|
skip = .git*,*.svg,i18n,*-lock.yaml,*.css,.codespellrc,migrations,*.js,*.map,*.mjs
|
||||||
|
check-hidden = true
|
||||||
|
# ignore all CamelCase and camelCase
|
||||||
|
ignore-regex = \b[A-Za-z][a-z]+[A-Z][a-zA-Z]+\b
|
||||||
|
ignore-words-list = tread
|
||||||
25
.github/workflows/codespell.yml
vendored
Normal file
25
.github/workflows/codespell.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Codespell configuration is within .codespellrc
|
||||||
|
---
|
||||||
|
name: Codespell
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [preview]
|
||||||
|
pull_request:
|
||||||
|
branches: [preview]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
codespell:
|
||||||
|
name: Check for spelling errors
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Annotate locations with typos
|
||||||
|
uses: codespell-project/codespell-problem-matcher@v1
|
||||||
|
- name: Codespell
|
||||||
|
uses: codespell-project/actions-codespell@v2
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Module improts
|
# Module imports
|
||||||
from .base import BaseSerializer
|
from .base import BaseSerializer
|
||||||
from .issue import IssueExpandSerializer
|
from .issue import IssueExpandSerializer
|
||||||
from plane.db.models import IntakeIssue, Issue
|
from plane.db.models import IntakeIssue, Issue
|
||||||
|
|||||||
@@ -1196,7 +1196,7 @@ class CycleAnalyticsEndpoint(BaseAPIView):
|
|||||||
if the issues were transferred to the new cycle, then the progress_snapshot will be present
|
if the issues were transferred to the new cycle, then the progress_snapshot will be present
|
||||||
return the progress_snapshot data in the analytics for each date
|
return the progress_snapshot data in the analytics for each date
|
||||||
|
|
||||||
else issues were not transferred to the new cycle then generate the stats from the cycle isssue bridge tables
|
else issues were not transferred to the new cycle then generate the stats from the cycle issue bridge tables
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if cycle.progress_snapshot:
|
if cycle.progress_snapshot:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ AUTHENTICATION_ERROR_CODES = {
|
|||||||
"INCORRECT_OLD_PASSWORD": 5135,
|
"INCORRECT_OLD_PASSWORD": 5135,
|
||||||
"MISSING_PASSWORD": 5138,
|
"MISSING_PASSWORD": 5138,
|
||||||
"INVALID_NEW_PASSWORD": 5140,
|
"INVALID_NEW_PASSWORD": 5140,
|
||||||
# set passowrd
|
# set password
|
||||||
"PASSWORD_ALREADY_SET": 5145,
|
"PASSWORD_ALREADY_SET": 5145,
|
||||||
# Admin
|
# Admin
|
||||||
"ADMIN_ALREADY_EXIST": 5150,
|
"ADMIN_ALREADY_EXIST": 5150,
|
||||||
|
|||||||
@@ -31,4 +31,4 @@ class Command(BaseCommand):
|
|||||||
user.is_active = True
|
user.is_active = True
|
||||||
user.save()
|
user.save()
|
||||||
|
|
||||||
self.stdout.write(self.style.SUCCESS("User activated succesfully"))
|
self.stdout.write(self.style.SUCCESS("User activated successfully"))
|
||||||
|
|||||||
@@ -59,4 +59,4 @@ class Command(BaseCommand):
|
|||||||
user.is_password_autoset = False
|
user.is_password_autoset = False
|
||||||
user.save()
|
user.save()
|
||||||
|
|
||||||
self.stdout.write(self.style.SUCCESS("User password updated succesfully"))
|
self.stdout.write(self.style.SUCCESS("User password updated successfully"))
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class Command(BaseCommand):
|
|||||||
try:
|
try:
|
||||||
s3_client.delete_object(Bucket=bucket_name, Key="test_permission_check.txt")
|
s3_client.delete_object(Bucket=bucket_name, Key="test_permission_check.txt")
|
||||||
except ClientError:
|
except ClientError:
|
||||||
self.stdout.write("Coudn't delete test object")
|
self.stdout.write("Couldn't delete test object")
|
||||||
|
|
||||||
# 4. Test s3:PutBucketPolicy (attempt to put a bucket policy)
|
# 4. Test s3:PutBucketPolicy (attempt to put a bucket policy)
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export enum EAuthenticationErrorCodes {
|
|||||||
INCORRECT_OLD_PASSWORD = "5135",
|
INCORRECT_OLD_PASSWORD = "5135",
|
||||||
MISSING_PASSWORD = "5138",
|
MISSING_PASSWORD = "5138",
|
||||||
INVALID_NEW_PASSWORD = "5140",
|
INVALID_NEW_PASSWORD = "5140",
|
||||||
// set passowrd
|
// set password
|
||||||
PASSWORD_ALREADY_SET = "5145",
|
PASSWORD_ALREADY_SET = "5145",
|
||||||
// Admin
|
// Admin
|
||||||
ADMIN_ALREADY_EXIST = "5150",
|
ADMIN_ALREADY_EXIST = "5150",
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ export class BaseTimeLineStore implements IBaseTimelineStore {
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updates the block's position such as marginLeft and width wile dragging
|
* updates the block's position such as marginLeft and width while dragging
|
||||||
* @param id
|
* @param id
|
||||||
* @param deltaLeft
|
* @param deltaLeft
|
||||||
* @param deltaWidth
|
* @param deltaWidth
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export const BaseListRoot = observer((props: IBaseListRoot) => {
|
|||||||
[fetchNextIssues]
|
[fetchNextIssues]
|
||||||
);
|
);
|
||||||
|
|
||||||
// kanbanFilters and EIssueFilterType.KANBAN_FILTERS are used becuase the state is shared between kanban view and list view
|
// kanbanFilters and EIssueFilterType.KANBAN_FILTERS are used because the state is shared between kanban view and list view
|
||||||
const handleCollapsedGroups = useCallback(
|
const handleCollapsedGroups = useCallback(
|
||||||
(value: string) => {
|
(value: string) => {
|
||||||
if (workspaceSlug) {
|
if (workspaceSlug) {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ declare interface SQLitePrepareOptions {
|
|||||||
* the corresponding Javascript wrapper will throw an exception with a
|
* the corresponding Javascript wrapper will throw an exception with a
|
||||||
* `code` property on an error.
|
* `code` property on an error.
|
||||||
*
|
*
|
||||||
* Note that a few functions return a Promise in order to accomodate
|
* Note that a few functions return a Promise in order to accommodate
|
||||||
* either a synchronous or asynchronous SQLite build, generally those
|
* either a synchronous or asynchronous SQLite build, generally those
|
||||||
* involved with opening/closing a database or executing a statement.
|
* involved with opening/closing a database or executing a statement.
|
||||||
*
|
*
|
||||||
@@ -330,7 +330,7 @@ declare interface SQLiteAPI {
|
|||||||
column(stmt: number, i: number): SQLiteCompatibleType;
|
column(stmt: number, i: number): SQLiteCompatibleType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a column value from a row after a prepared statment {@link step}
|
* Extract a column value from a row after a prepared statement {@link step}
|
||||||
*
|
*
|
||||||
* The contents of the returned buffer may be invalid after the
|
* The contents of the returned buffer may be invalid after the
|
||||||
* next SQLite call. Make a copy of the data (e.g. with `.slice()`)
|
* next SQLite call. Make a copy of the data (e.g. with `.slice()`)
|
||||||
@@ -360,7 +360,7 @@ declare interface SQLiteAPI {
|
|||||||
column_count(stmt: number): number;
|
column_count(stmt: number): number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a column value from a row after a prepared statment {@link step}
|
* Extract a column value from a row after a prepared statement {@link step}
|
||||||
* @see https://www.sqlite.org/c3ref/column_blob.html
|
* @see https://www.sqlite.org/c3ref/column_blob.html
|
||||||
* @param stmt prepared statement pointer
|
* @param stmt prepared statement pointer
|
||||||
* @param i column index
|
* @param i column index
|
||||||
@@ -369,7 +369,7 @@ declare interface SQLiteAPI {
|
|||||||
column_double(stmt: number, i: number): number;
|
column_double(stmt: number, i: number): number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a column value from a row after a prepared statment {@link step}
|
* Extract a column value from a row after a prepared statement {@link step}
|
||||||
* @see https://www.sqlite.org/c3ref/column_blob.html
|
* @see https://www.sqlite.org/c3ref/column_blob.html
|
||||||
* @param stmt prepared statement pointer
|
* @param stmt prepared statement pointer
|
||||||
* @param i column index
|
* @param i column index
|
||||||
@@ -378,7 +378,7 @@ declare interface SQLiteAPI {
|
|||||||
column_int(stmt: number, i: number): number;
|
column_int(stmt: number, i: number): number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a column value from a row after a prepared statment {@link step}
|
* Extract a column value from a row after a prepared statement {@link step}
|
||||||
* @see https://www.sqlite.org/c3ref/column_blob.html
|
* @see https://www.sqlite.org/c3ref/column_blob.html
|
||||||
* @param stmt prepared statement pointer
|
* @param stmt prepared statement pointer
|
||||||
* @param i column index
|
* @param i column index
|
||||||
@@ -406,7 +406,7 @@ declare interface SQLiteAPI {
|
|||||||
column_names(stmt: number): Array<string>;
|
column_names(stmt: number): Array<string>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a column value from a row after a prepared statment {@link step}
|
* Extract a column value from a row after a prepared statement {@link step}
|
||||||
* @see https://www.sqlite.org/c3ref/column_blob.html
|
* @see https://www.sqlite.org/c3ref/column_blob.html
|
||||||
* @param stmt prepared statement pointer
|
* @param stmt prepared statement pointer
|
||||||
* @param i column index
|
* @param i column index
|
||||||
@@ -1190,7 +1190,7 @@ declare module "wa-sqlite/src/VFS.js" {
|
|||||||
*/
|
*/
|
||||||
xAccess(name: string, flags: number, pResOut: DataView): number;
|
xAccess(name: string, flags: number, pResOut: DataView): number;
|
||||||
/**
|
/**
|
||||||
* Handle asynchronous operation. This implementation will be overriden on
|
* Handle asynchronous operation. This implementation will be overridden on
|
||||||
* registration by an Asyncify build.
|
* registration by an Asyncify build.
|
||||||
* @param {function(): Promise<number>} f
|
* @param {function(): Promise<number>} f
|
||||||
* @returns {number}
|
* @returns {number}
|
||||||
|
|||||||
@@ -1673,7 +1673,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This Method is used to get data of the issue based on the ids of the data for states, labels adn assignees
|
* This Method is used to get data of the issue based on the ids of the data for states, labels and assignees
|
||||||
* @param dataType what type of data is being sent
|
* @param dataType what type of data is being sent
|
||||||
* @param dataIds id/ids of the data that is to be populated
|
* @param dataIds id/ids of the data that is to be populated
|
||||||
* @param order ascending or descending for arrays of data
|
* @param order ascending or descending for arrays of data
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ export class UserStore implements IUserStore {
|
|||||||
|
|
||||||
// helper actions
|
// helper actions
|
||||||
/**
|
/**
|
||||||
* @description fetches the prjects with write permissions
|
* @description fetches the projects with write permissions
|
||||||
* @returns {{[projectId: string]: number} || null}
|
* @returns {{[projectId: string]: number} || null}
|
||||||
*/
|
*/
|
||||||
fetchProjectsWithCreatePermissions = (): { [key: string]: TUserPermissions } => {
|
fetchProjectsWithCreatePermissions = (): { [key: string]: TUserPermissions } => {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export enum EAuthenticationErrorCodes {
|
|||||||
INCORRECT_OLD_PASSWORD = "5135",
|
INCORRECT_OLD_PASSWORD = "5135",
|
||||||
MISSING_PASSWORD = "5138",
|
MISSING_PASSWORD = "5138",
|
||||||
INVALID_NEW_PASSWORD = "5140",
|
INVALID_NEW_PASSWORD = "5140",
|
||||||
// set passowrd
|
// set password
|
||||||
PASSWORD_ALREADY_SET = "5145",
|
PASSWORD_ALREADY_SET = "5145",
|
||||||
// Admin
|
// Admin
|
||||||
ADMIN_ALREADY_EXIST = "5150",
|
ADMIN_ALREADY_EXIST = "5150",
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ There are many other settings you can play with, but we suggest you configure `E
|
|||||||
|
|
||||||
### Continue with setup - Start Server (Docker Compose)
|
### Continue with setup - Start Server (Docker Compose)
|
||||||
|
|
||||||
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `2` to start the sevices
|
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `2` to start the services
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
Select a Action you want to perform:
|
Select a Action you want to perform:
|
||||||
@@ -191,7 +191,7 @@ In case you want to make changes to `plane.env` variables, we suggest you to sto
|
|||||||
|
|
||||||
#### Docker Compose
|
#### Docker Compose
|
||||||
|
|
||||||
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `3` to stop the sevices
|
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `3` to stop the services
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
Select a Action you want to perform:
|
Select a Action you want to perform:
|
||||||
@@ -213,7 +213,7 @@ If all goes well, you must see something like this
|
|||||||
|
|
||||||
#### Docker Swarm
|
#### Docker Swarm
|
||||||
|
|
||||||
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `2` to stop the sevices
|
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `2` to stop the services
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
Select an Action you want to perform:
|
Select an Action you want to perform:
|
||||||
@@ -236,7 +236,7 @@ If all goes well, you will see the confirmation from docker cli
|
|||||||
|
|
||||||
In case you want to make changes to `plane.env` variables, without stopping the server or you noticed some abnormalies in services, you can restart the services with `RESTART` / `REDEPLOY` option.
|
In case you want to make changes to `plane.env` variables, without stopping the server or you noticed some abnormalies in services, you can restart the services with `RESTART` / `REDEPLOY` option.
|
||||||
|
|
||||||
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `4` to restart the sevices
|
Lets again run the `./setup.sh` command. You will again be prompted with the below options. This time select `4` to restart the services
|
||||||
|
|
||||||
#### Docker Compose
|
#### Docker Compose
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export function LowlightPlugin({
|
|||||||
([oldNodeName, newNodeName].includes(name) ||
|
([oldNodeName, newNodeName].includes(name) ||
|
||||||
// OR transaction adds/removes named node,
|
// OR transaction adds/removes named node,
|
||||||
newNodes.length !== oldNodes.length ||
|
newNodes.length !== oldNodes.length ||
|
||||||
// OR transaction has changes that completely encapsulte a node
|
// OR transaction has changes that completely encapsulate a node
|
||||||
// (for example, a transaction that affects the entire document).
|
// (for example, a transaction that affects the entire document).
|
||||||
// Such transactions can happen during collab syncing via y-prosemirror, for example.
|
// Such transactions can happen during collab syncing via y-prosemirror, for example.
|
||||||
transaction.steps.some(
|
transaction.steps.some(
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export function autolink(options: AutolinkOptions): Plugin {
|
|||||||
);
|
);
|
||||||
} else if (
|
} else if (
|
||||||
nodesInChangedRanges.length &&
|
nodesInChangedRanges.length &&
|
||||||
// We want to make sure to include the block seperator argument to treat hard breaks like spaces.
|
// We want to make sure to include the block separator argument to treat hard breaks like spaces.
|
||||||
newState.doc.textBetween(newRange.from, newRange.to, " ", " ").endsWith(" ")
|
newState.doc.textBetween(newRange.from, newRange.to, " ", " ").endsWith(" ")
|
||||||
) {
|
) {
|
||||||
textBlock = nodesInChangedRanges[0];
|
textBlock = nodesInChangedRanges[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user