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

支持飞书传图GitHub #231

Merged
merged 9 commits into from
Feb 27, 2024
Merged

支持飞书传图GitHub #231

merged 9 commits into from
Feb 27, 2024

Conversation

freeziyou
Copy link
Contributor

@freeziyou freeziyou commented Feb 22, 2024

  • img_key转换成url,通过url直接调用飞书下载图片
  • 权限控制(公私仓库)

@freeziyou
Copy link
Contributor Author

#207

else str(task.result),
"result": (
task.result if isinstance(task.result, list) else str(task.result)
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里改了结构,需要和前端沟通好,免得前端调用接口的时候报错

@Leizhenpeng
Copy link
Member

Leizhenpeng commented Feb 24, 2024

私有仓库 传图那个有解吗?能否先牺牲一点安全性,先考虑基本可用(比如直接把GitHub那边的图片链接发送到飞书这边来)
@freeziyou

Copy link
Contributor Author

Copy link
Contributor Author

从飞书传图到GitHub公私仓库都没问题,主要是Github私有仓库传图到飞书有问题

@Leizhenpeng
Copy link
Member

授权之后的GitMaya机器人也无法访问GitHub私有仓库的图片对吧?

Copy link
Contributor Author

没法访问,和林哥探索的唯一方式是拿GitHub personal user token可以访问,但这个只能由用户自己在Github手动创建token,并且权限过大,仅为看图不合理…而且测试其他包括oauth token installation token都没用

@Leizhenpeng
Copy link
Member

这个图片的链接可以拿到吧,直接回传到飞书呗

@Leizhenpeng
Copy link
Member

Leizhenpeng commented Feb 24, 2024

不上传飞书图床,直接显示原始链接url ,可行吗? @freeziyou

Copy link
Contributor Author

可以做,但这样的话,相当于飞书这边只显示图片链接没显示图片

@freeziyou freeziyou self-assigned this Feb 26, 2024
server/routes/user.py Outdated Show resolved Hide resolved
@freeziyou freeziyou merged commit b97aa51 into main Feb 27, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants