Properly fix actions to work with Forgejo Actions #38

Merged
sugar merged 6 commits from sugar/forkey:use-pnpm-action-4.0.0 into main 2025-01-17 11:42:39 +00:00
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 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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -244,7 +244,7 @@ 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) {

View file

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

View file

@ -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,
} : {}), } : {}),
}); });

View file

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

View file

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