forked from Lesin/reposync
This commit is contained in:
parent
6b5ae8e652
commit
4080689fcf
|
@ -16,7 +16,8 @@ RUN wget -P /data/ob-tool https://mirrors.huaweicloud.com/python/3.9.6/Python-3.
|
|||
# 将项目文件复制到容器中
|
||||
ADD ./ /data/ob-robot/
|
||||
|
||||
RUN pip3.9 install -r /data/ob-robot/requirement.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
RUN pip3.9 install -r /data/ob-robot/requirement.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
|
||||
|
||||
|
||||
|
||||
# 安装Git和OpenSSH服务器
|
||||
|
|
2
main.py
2
main.py
|
@ -26,7 +26,7 @@ app.include_router(AUTH)
|
|||
app.include_router(SYNC_CONFIG)
|
||||
app.include_router(ISSUES)
|
||||
|
||||
app.mount("/", StaticFiles(directory="web/dist"), name="static")
|
||||
app.mount("/", StaticFiles(directory="web"), name="static")
|
||||
|
||||
if __name__ == '__main__':
|
||||
# workers 参数仅在命令行使用uvicorn启动时有效 或使用环境变量 WEB_CONCURRENCY
|
||||
|
|
|
@ -19,7 +19,7 @@ from extras.obfastapi.frame import OBResponse as Response
|
|||
from src.base.code import Code
|
||||
from src.base.error_code import ErrorTemplate, Errors
|
||||
from src.router import PULL_REQUEST as pull_request
|
||||
# from src.router import ISSUES as issues
|
||||
from src.router import ISSUES as issues
|
||||
from src.api.Controller import APIController as Controller
|
||||
from src.dto.pull_request import PullRequest as PullRequestData
|
||||
from src.service.pull_request import PullRequestService
|
||||
|
@ -229,15 +229,15 @@ class PullRequest(Controller):
|
|||
):
|
||||
return gitee.fetch_gitee_pull_request(token, owner, repo, state)
|
||||
|
||||
# class Issues(Controller):
|
||||
# def get_user(self, cookie_key=Security(Controller.API_KEY_BUC_COOKIE), token: str = None):
|
||||
# return super().get_user(cookie_key=cookie_key, token=token)
|
||||
class Issues(Controller):
|
||||
def get_user(self, cookie_key=Security(Controller.API_KEY_BUC_COOKIE), token: str = None):
|
||||
return super().get_user(cookie_key=cookie_key, token=token)
|
||||
|
||||
# @issues.get("/fetch/issues", description='获取issues列表')
|
||||
# async def get_issues(
|
||||
# self,
|
||||
# owner: str = Query(..., description= '仓库所有者'),
|
||||
# repo: str = Query(..., description='仓库名称')
|
||||
# ):
|
||||
# issue_list = gitee.fetch_gitee_issues(owner, repo)
|
||||
# return issue_list
|
||||
@issues.get("/fetch/issues", description='获取issues列表')
|
||||
async def get_issues(
|
||||
self,
|
||||
owner: str = Query(..., description= '仓库所有者'),
|
||||
repo: str = Query(..., description='仓库名称')
|
||||
):
|
||||
issue_list = gitee.fetch_gitee_issues(owner, repo)
|
||||
return issue_list
|
|
@ -1,6 +1,4 @@
|
|||
from extras.obfastapi.frame import OBAPIRouter
|
||||
# from .issues import ISSUES
|
||||
|
||||
|
||||
__all__ = ("CE_ROBOT", "PROJECT", "JOB",
|
||||
"PULL_REQUEST", "ACCOUNT", "USER", "LOG", "AUTH", "SYNC_CONFIG")
|
||||
|
|
Loading…
Reference in New Issue