forked from woem.men/forkey
Merge pull request 'Properly fix actions to work with Forgejo Actions' (#38) from sugar/forkey:use-pnpm-action-4.0.0 into main
Reviewed-on: woem.men/forkey#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
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
- uses: actions/setup-node@v4.1.0
|
||||
|
@ -51,7 +51,7 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
- uses: actions/setup-node@v4.1.0
|
||||
|
@ -75,7 +75,7 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
- uses: actions/setup-node@v4.1.0
|
||||
|
|
|
@ -25,8 +25,6 @@ jobs:
|
|||
services:
|
||||
postgres:
|
||||
image: postgres:15
|
||||
ports:
|
||||
- 54312:5432
|
||||
env:
|
||||
POSTGRES_DB: test-misskey
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
|
@ -42,8 +40,6 @@ jobs:
|
|||
DFLY_conn_io_threads: 4
|
||||
DFLY_epoll_file_threads: 4
|
||||
DFLY_proactor_threads: 4
|
||||
ports:
|
||||
- 56312:6379
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -51,11 +47,11 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
- name: Install FFmpeg
|
||||
uses: FedericoCarboni/setup-ffmpeg@v3
|
||||
uses: https://github.com/FedericoCarboni/setup-ffmpeg@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
|
@ -65,7 +61,7 @@ jobs:
|
|||
- name: Check pnpm-lock.yaml
|
||||
run: git diff --exit-code pnpm-lock.yaml
|
||||
- name: Copy Configure
|
||||
run: cp .forgejo/misskey/test.yml .config
|
||||
run: cp .forgejo/misskey/test-forgejo.yml .config/test.yml
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Test
|
||||
|
@ -81,8 +77,6 @@ jobs:
|
|||
services:
|
||||
postgres:
|
||||
image: postgres:15
|
||||
ports:
|
||||
- 54312:5432
|
||||
env:
|
||||
POSTGRES_DB: test-misskey
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
|
@ -98,8 +92,6 @@ jobs:
|
|||
DFLY_conn_io_threads: 4
|
||||
DFLY_epoll_file_threads: 4
|
||||
DFLY_proactor_threads: 4
|
||||
ports:
|
||||
- 56312:6379
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -107,7 +99,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
|
@ -119,7 +111,7 @@ jobs:
|
|||
- name: Check pnpm-lock.yaml
|
||||
run: git diff --exit-code pnpm-lock.yaml
|
||||
- name: Copy Configure
|
||||
run: cp .forgejo/misskey/test.yml .config
|
||||
run: cp .forgejo/misskey/test-forgejo.yml .config/test.yml
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Test
|
||||
|
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
|
@ -47,7 +47,7 @@ jobs:
|
|||
- name: Check pnpm-lock.yaml
|
||||
run: git diff --exit-code pnpm-lock.yaml
|
||||
- name: Copy Configure
|
||||
run: cp .forgejo/misskey/test.yml .config
|
||||
run: cp .forgejo/misskey/test-forgejo.yml .config/test.yml
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Test
|
||||
|
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
|
@ -35,6 +35,6 @@ jobs:
|
|||
- name: Check pnpm-lock.yaml
|
||||
run: git diff --exit-code pnpm-lock.yaml
|
||||
- name: Copy Configure
|
||||
run: cp .forgejo/misskey/test.yml .config/default.yml
|
||||
run: cp .forgejo/misskey/test-forgejo.yml .config/default.yml
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
run_install: false
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
|
|
|
@ -651,6 +651,14 @@ export const packedMeDetailedOnlySchema = {
|
|||
type: 'boolean',
|
||||
nullable: true, optional: true,
|
||||
},
|
||||
approved: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
signupReason: {
|
||||
type: 'string',
|
||||
nullable: true, optional: true,
|
||||
},
|
||||
securityKeysList: {
|
||||
type: 'array',
|
||||
nullable: false, optional: true,
|
||||
|
|
|
@ -244,14 +244,14 @@ export class SignupApiService {
|
|||
} else {
|
||||
try {
|
||||
const { account, secret } = await this.signupService.signup({
|
||||
username, password, host, reason
|
||||
username, password, host, reason,
|
||||
});
|
||||
|
||||
if (instance.approvalRequiredForSignup) {
|
||||
if (emailAddress) {
|
||||
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 });
|
||||
|
||||
|
||||
//Actually delete it since the last function doesnt actually delete the account
|
||||
//Note: Before approval these accounts wont federate so this is totally fine.
|
||||
await this.usersRepository.delete(user.id);
|
||||
|
||||
|
||||
this.moderationLogService.log(me, 'decline', {
|
||||
userId: user.id,
|
||||
userUsername: user.username,
|
||||
|
|
|
@ -37,9 +37,9 @@ export const meta = {
|
|||
|
||||
unapprovedUser: {
|
||||
message: 'The user has not been approved yet.',
|
||||
code: 'UNAPPROVED_USER',
|
||||
id: '8d66f136-b3e1-48fd-92c4-30ecfd7fdb7a',
|
||||
},
|
||||
code: 'UNAPPROVED_USER',
|
||||
id: '8d66f136-b3e1-48fd-92c4-30ecfd7fdb7a',
|
||||
},
|
||||
|
||||
followeeIsYourself: {
|
||||
message: 'Followee is yourself.',
|
||||
|
|
|
@ -151,6 +151,8 @@ describe('ユーザー', () => {
|
|||
...(security ? {
|
||||
email: user.email,
|
||||
emailVerified: user.emailVerified,
|
||||
approved: user.approved,
|
||||
signupReason: user.signupReason,
|
||||
securityKeysList: user.securityKeysList,
|
||||
} : {}),
|
||||
});
|
||||
|
|
|
@ -46,8 +46,8 @@ const pagination = {
|
|||
function deleted(id: string) {
|
||||
if (paginationComponent.value) {
|
||||
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')),
|
||||
}, {
|
||||
path: '/approvals',
|
||||
name: 'approvals',
|
||||
component: page(() => import('@/pages/admin/approvals.vue')),
|
||||
}, {
|
||||
name: 'approvals',
|
||||
component: page(() => import('@/pages/admin/approvals.vue')),
|
||||
}, {
|
||||
path: '/',
|
||||
component: page(() => import('@/pages/_empty_.vue')),
|
||||
}],
|
||||
},{
|
||||
}, {
|
||||
path: '/my/notifications',
|
||||
component: page(() => import('@/pages/notifications.vue')),
|
||||
loginRequired: true,
|
||||
|
|
|
@ -4103,6 +4103,8 @@ export type components = {
|
|||
policies: components['schemas']['RolePolicies'];
|
||||
email?: string | null;
|
||||
emailVerified?: boolean | null;
|
||||
approved?: boolean;
|
||||
signupReason?: string | null;
|
||||
securityKeysList?: {
|
||||
/**
|
||||
* Format: id
|
||||
|
@ -15517,6 +15519,8 @@ export type operations = {
|
|||
type?: string | null;
|
||||
/** @enum {string|null} */
|
||||
sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+size' | '-size' | null;
|
||||
/** @default */
|
||||
searchQuery?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -16116,6 +16120,8 @@ export type operations = {
|
|||
* @default null
|
||||
*/
|
||||
folderId?: string | null;
|
||||
/** @default */
|
||||
searchQuery?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue