Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 봇 / 서버 - 소유주 간 관계도 개선 #659

Merged
merged 7 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/no-explicit-any': 'off',
quotes: ['error', 'single'],
semi: ['error', 'never'],
},
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/publish-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish by Manual
on: workflow_dispatch

env:
REGISTRY: ghcr.io
NAME: koreanbots/core

jobs:
image-push:
name: Push docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.GITHUB_REF }}
submodules: true
- name: Parse image tag
run: |
parsed=${GITHUB_REF#refs/*/}
echo "RELEASE_TAG=${parsed//\//-}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get metadata for Docker
uses: docker/metadata-action@v4
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.NAME }}
tags: |
type=raw,value=latest,priority=100
type=sha,prefix=,suffix=,format=short,priority=300
type=schedule,pattern={{date 'YYYYMMDD-hhmmss' tz='Asia/Seoul'}}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
NEXT_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
NEXT_PUBLIC_HCAPTCHA_SITEKEY=${{ secrets.NEXT_PUBLIC_HCAPTCHA_SITEKEY }}
SOURCE_COMMIT=${{ github.sha }}
TAG=${{ env.RELEASE_TAG }}
17 changes: 7 additions & 10 deletions pages/pendingBots/[id]/[date].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { get } from '@utils/Query'
import { BotSubmissionDenyReasonPresetsName, git } from '@utils/Constants'
import Day from '@utils/Day'

import { SubmittedBot, User } from '@types'
import { SubmittedBot } from '@types'

import useClipboard from 'react-use-clipboard'
import { ParsedUrlQuery } from 'querystring'
Expand Down Expand Up @@ -146,15 +146,12 @@ const PendingBot: NextPage<PendingBotProps> = ({ data }) => {
))}
</div>
<h2 className='3xl mb-2 mt-2 font-bold'>제작자</h2>
{(data.owners as User[]).map((el) => (
<Owner
key={el.id}
id={el.id}
tag={el.tag}
globalName={el.globalName}
username={el.username}
/>
))}
<Owner
id={data.owner.id}
tag={data.owner.tag}
globalName={data.owner.globalName}
username={data.owner.username}
/>
<div className='list grid'>
{data.discord && (
<a
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types/index.ts"
]
},
"target": "es5",
"target": "es6",
"lib": [
"dom",
"dom.iterable",
Expand Down
7 changes: 6 additions & 1 deletion types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export interface List<T> {
export interface SubmittedBot {
id: string
date: number
owners: User[]
owner: User
lib: Library
prefix: string
intro: string
Expand Down Expand Up @@ -378,3 +378,8 @@ export interface ResponseProps<T = Data> {
interface Data<T = unknown> {
[key: string]: T
}

export enum ObjectType {
Bot = 1,
Server = 2,
}
Loading
Loading