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:
sugar 2025-01-17 11:42:38 +00:00
commit b279f6e3d2
16 changed files with 59 additions and 37 deletions

View 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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 }}

View file

@ -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,

View file

@ -244,7 +244,7 @@ export class SignupApiService {
} else {
try {
const { account, secret } = await this.signupService.signup({
username, password, host, reason
username, password, host, reason,
});
if (instance.approvalRequiredForSignup) {

View file

@ -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,

View file

@ -151,6 +151,8 @@ describe('ユーザー', () => {
...(security ? {
email: user.email,
emailVerified: user.emailVerified,
approved: user.approved,
signupReason: user.signupReason,
securityKeysList: user.securityKeysList,
} : {}),
});

View file

@ -46,7 +46,7 @@ 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,
);
}
}

View file

@ -490,7 +490,7 @@ const routes: RouteDef[] = [{
path: '/',
component: page(() => import('@/pages/_empty_.vue')),
}],
},{
}, {
path: '/my/notifications',
component: page(() => import('@/pages/notifications.vue')),
loginRequired: true,

View file

@ -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;
};
};
};