Merge pull request 'Properly fix actions to work with Forgejo Actions' (#38) from sugar/forkey:use-pnpm-action-4.0.0 into main
All checks were successful
API report (misskey.js) / report (push) Successful in 2m34s
Lint / pnpm_install (push) Successful in 2m7s
Test (backend) / unit (22.x) (push) Successful in 6m55s
Test (backend) / e2e (22.x) (push) Successful in 8m55s
Test (misskey.js) / test (22.x) (push) Successful in 3m2s
Test (production install and build) / production (22.x) (push) Successful in 2m42s
Test (backend) / validate-api-json (22.x) (push) Successful in 3m16s
Lint / lint (backend) (push) Successful in 2m38s
Lint / lint (frontend) (push) Successful in 9m36s
Lint / lint (misskey-js) (push) Successful in 2m36s
Lint / lint (sw) (push) Successful in 2m21s
Lint / typecheck (backend) (push) Successful in 3m8s
Lint / typecheck (misskey-js) (push) Successful in 2m25s
All checks were successful
API report (misskey.js) / report (push) Successful in 2m34s
Lint / pnpm_install (push) Successful in 2m7s
Test (backend) / unit (22.x) (push) Successful in 6m55s
Test (backend) / e2e (22.x) (push) Successful in 8m55s
Test (misskey.js) / test (22.x) (push) Successful in 3m2s
Test (production install and build) / production (22.x) (push) Successful in 2m42s
Test (backend) / validate-api-json (22.x) (push) Successful in 3m16s
Lint / lint (backend) (push) Successful in 2m38s
Lint / lint (frontend) (push) Successful in 9m36s
Lint / lint (misskey-js) (push) Successful in 2m36s
Lint / lint (sw) (push) Successful in 2m21s
Lint / typecheck (backend) (push) Successful in 3m8s
Lint / typecheck (misskey-js) (push) Successful in 2m25s
Reviewed-on: #38
This commit is contained in:
commit
b279f6e3d2
16 changed files with 59 additions and 37 deletions
16
.forgejo/misskey/test-forgejo.yml
Normal file
16
.forgejo/misskey/test-forgejo.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Workaround for Forgejo not supporting port redirection
|
||||||
|
|
||||||
|
url: 'http://misskey.local'
|
||||||
|
|
||||||
|
port: 61812
|
||||||
|
|
||||||
|
db:
|
||||||
|
host: postgres
|
||||||
|
port: 5432
|
||||||
|
db: test-misskey
|
||||||
|
user: postgres
|
||||||
|
pass: ''
|
||||||
|
redis:
|
||||||
|
host: dragonfly
|
||||||
|
port: 6379
|
||||||
|
id: aidx
|
|
@ -21,7 +21,7 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- uses: actions/setup-node@v4.1.0
|
- uses: actions/setup-node@v4.1.0
|
||||||
|
@ -51,7 +51,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- uses: actions/setup-node@v4.1.0
|
- uses: actions/setup-node@v4.1.0
|
||||||
|
@ -75,7 +75,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- uses: actions/setup-node@v4.1.0
|
- uses: actions/setup-node@v4.1.0
|
||||||
|
|
|
@ -25,8 +25,6 @@ jobs:
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
ports:
|
|
||||||
- 54312:5432
|
|
||||||
env:
|
env:
|
||||||
POSTGRES_DB: test-misskey
|
POSTGRES_DB: test-misskey
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
@ -42,8 +40,6 @@ jobs:
|
||||||
DFLY_conn_io_threads: 4
|
DFLY_conn_io_threads: 4
|
||||||
DFLY_epoll_file_threads: 4
|
DFLY_epoll_file_threads: 4
|
||||||
DFLY_proactor_threads: 4
|
DFLY_proactor_threads: 4
|
||||||
ports:
|
|
||||||
- 56312:6379
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -51,11 +47,11 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Install FFmpeg
|
- name: Install FFmpeg
|
||||||
uses: FedericoCarboni/setup-ffmpeg@v3
|
uses: https://github.com/FedericoCarboni/setup-ffmpeg@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.1.0
|
uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
|
@ -65,7 +61,7 @@ jobs:
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
run: git diff --exit-code pnpm-lock.yaml
|
||||||
- name: Copy Configure
|
- name: Copy Configure
|
||||||
run: cp .forgejo/misskey/test.yml .config
|
run: cp .forgejo/misskey/test-forgejo.yml .config/test.yml
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
- name: Test
|
- name: Test
|
||||||
|
@ -81,8 +77,6 @@ jobs:
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
ports:
|
|
||||||
- 54312:5432
|
|
||||||
env:
|
env:
|
||||||
POSTGRES_DB: test-misskey
|
POSTGRES_DB: test-misskey
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
@ -98,8 +92,6 @@ jobs:
|
||||||
DFLY_conn_io_threads: 4
|
DFLY_conn_io_threads: 4
|
||||||
DFLY_epoll_file_threads: 4
|
DFLY_epoll_file_threads: 4
|
||||||
DFLY_proactor_threads: 4
|
DFLY_proactor_threads: 4
|
||||||
ports:
|
|
||||||
- 56312:6379
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -107,7 +99,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
@ -119,7 +111,7 @@ jobs:
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
run: git diff --exit-code pnpm-lock.yaml
|
||||||
- name: Copy Configure
|
- name: Copy Configure
|
||||||
run: cp .forgejo/misskey/test.yml .config
|
run: cp .forgejo/misskey/test-forgejo.yml .config/test.yml
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
- name: Test
|
- name: Test
|
||||||
|
|
|
@ -35,7 +35,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
@ -47,7 +47,7 @@ jobs:
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
run: git diff --exit-code pnpm-lock.yaml
|
||||||
- name: Copy Configure
|
- name: Copy Configure
|
||||||
run: cp .forgejo/misskey/test.yml .config
|
run: cp .forgejo/misskey/test-forgejo.yml .config/test.yml
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
- name: Test
|
- name: Test
|
||||||
|
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
@ -35,6 +35,6 @@ jobs:
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
run: git diff --exit-code pnpm-lock.yaml
|
||||||
- name: Copy Configure
|
- name: Copy Configure
|
||||||
run: cp .forgejo/misskey/test.yml .config/default.yml
|
run: cp .forgejo/misskey/test-forgejo.yml .config/default.yml
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
|
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4.0.0
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
|
|
@ -651,6 +651,14 @@ export const packedMeDetailedOnlySchema = {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
nullable: true, optional: true,
|
nullable: true, optional: true,
|
||||||
},
|
},
|
||||||
|
approved: {
|
||||||
|
type: 'boolean',
|
||||||
|
nullable: false, optional: true,
|
||||||
|
},
|
||||||
|
signupReason: {
|
||||||
|
type: 'string',
|
||||||
|
nullable: true, optional: true,
|
||||||
|
},
|
||||||
securityKeysList: {
|
securityKeysList: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
nullable: false, optional: true,
|
nullable: false, optional: true,
|
||||||
|
|
|
@ -244,14 +244,14 @@ export class SignupApiService {
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const { account, secret } = await this.signupService.signup({
|
const { account, secret } = await this.signupService.signup({
|
||||||
username, password, host, reason
|
username, password, host, reason,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (instance.approvalRequiredForSignup) {
|
if (instance.approvalRequiredForSignup) {
|
||||||
if (emailAddress) {
|
if (emailAddress) {
|
||||||
this.emailService.sendEmail(emailAddress, 'Approval pending',
|
this.emailService.sendEmail(emailAddress, 'Approval pending',
|
||||||
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.',
|
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.',
|
||||||
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.');
|
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,12 +63,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
await this.usedUsernamesRepository.delete({ username: user.username });
|
await this.usedUsernamesRepository.delete({ username: user.username });
|
||||||
|
|
||||||
|
|
||||||
//Actually delete it since the last function doesnt actually delete the account
|
//Actually delete it since the last function doesnt actually delete the account
|
||||||
//Note: Before approval these accounts wont federate so this is totally fine.
|
//Note: Before approval these accounts wont federate so this is totally fine.
|
||||||
await this.usersRepository.delete(user.id);
|
await this.usersRepository.delete(user.id);
|
||||||
|
|
||||||
|
|
||||||
this.moderationLogService.log(me, 'decline', {
|
this.moderationLogService.log(me, 'decline', {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
userUsername: user.username,
|
userUsername: user.username,
|
||||||
|
|
|
@ -37,9 +37,9 @@ export const meta = {
|
||||||
|
|
||||||
unapprovedUser: {
|
unapprovedUser: {
|
||||||
message: 'The user has not been approved yet.',
|
message: 'The user has not been approved yet.',
|
||||||
code: 'UNAPPROVED_USER',
|
code: 'UNAPPROVED_USER',
|
||||||
id: '8d66f136-b3e1-48fd-92c4-30ecfd7fdb7a',
|
id: '8d66f136-b3e1-48fd-92c4-30ecfd7fdb7a',
|
||||||
},
|
},
|
||||||
|
|
||||||
followeeIsYourself: {
|
followeeIsYourself: {
|
||||||
message: 'Followee is yourself.',
|
message: 'Followee is yourself.',
|
||||||
|
|
|
@ -151,6 +151,8 @@ describe('ユーザー', () => {
|
||||||
...(security ? {
|
...(security ? {
|
||||||
email: user.email,
|
email: user.email,
|
||||||
emailVerified: user.emailVerified,
|
emailVerified: user.emailVerified,
|
||||||
|
approved: user.approved,
|
||||||
|
signupReason: user.signupReason,
|
||||||
securityKeysList: user.securityKeysList,
|
securityKeysList: user.securityKeysList,
|
||||||
} : {}),
|
} : {}),
|
||||||
});
|
});
|
||||||
|
|
|
@ -46,8 +46,8 @@ const pagination = {
|
||||||
function deleted(id: string) {
|
function deleted(id: string) {
|
||||||
if (paginationComponent.value) {
|
if (paginationComponent.value) {
|
||||||
paginationComponent.value.items = paginationComponent.value.items.filter(
|
paginationComponent.value.items = paginationComponent.value.items.filter(
|
||||||
(item: any) => item.id !== id
|
(item: any) => item.id !== id,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -484,13 +484,13 @@ const routes: RouteDef[] = [{
|
||||||
component: page(() => import('@/pages/admin/invites.vue')),
|
component: page(() => import('@/pages/admin/invites.vue')),
|
||||||
}, {
|
}, {
|
||||||
path: '/approvals',
|
path: '/approvals',
|
||||||
name: 'approvals',
|
name: 'approvals',
|
||||||
component: page(() => import('@/pages/admin/approvals.vue')),
|
component: page(() => import('@/pages/admin/approvals.vue')),
|
||||||
}, {
|
}, {
|
||||||
path: '/',
|
path: '/',
|
||||||
component: page(() => import('@/pages/_empty_.vue')),
|
component: page(() => import('@/pages/_empty_.vue')),
|
||||||
}],
|
}],
|
||||||
},{
|
}, {
|
||||||
path: '/my/notifications',
|
path: '/my/notifications',
|
||||||
component: page(() => import('@/pages/notifications.vue')),
|
component: page(() => import('@/pages/notifications.vue')),
|
||||||
loginRequired: true,
|
loginRequired: true,
|
||||||
|
|
|
@ -4103,6 +4103,8 @@ export type components = {
|
||||||
policies: components['schemas']['RolePolicies'];
|
policies: components['schemas']['RolePolicies'];
|
||||||
email?: string | null;
|
email?: string | null;
|
||||||
emailVerified?: boolean | null;
|
emailVerified?: boolean | null;
|
||||||
|
approved?: boolean;
|
||||||
|
signupReason?: string | null;
|
||||||
securityKeysList?: {
|
securityKeysList?: {
|
||||||
/**
|
/**
|
||||||
* Format: id
|
* Format: id
|
||||||
|
@ -15517,6 +15519,8 @@ export type operations = {
|
||||||
type?: string | null;
|
type?: string | null;
|
||||||
/** @enum {string|null} */
|
/** @enum {string|null} */
|
||||||
sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+size' | '-size' | null;
|
sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+size' | '-size' | null;
|
||||||
|
/** @default */
|
||||||
|
searchQuery?: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -16116,6 +16120,8 @@ export type operations = {
|
||||||
* @default null
|
* @default null
|
||||||
*/
|
*/
|
||||||
folderId?: string | null;
|
folderId?: string | null;
|
||||||
|
/** @default */
|
||||||
|
searchQuery?: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue