登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
代码拉取完成,页面将自动刷新
仓库状态说明
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
13
Star
25
Fork
28
openEuler
/
ci-bot
关闭
代码
Issues
9
Pull Requests
0
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
26
Add support for manipulating the can_comment setting of a repository
已合并
imjoey:repo_comment
openEuler:master
imjoey
创建于 2020-03-08 02:19
克隆/下载
HTTPS
SSH
复制
下载 Email Patch
下载 Diff 文件
Previously all the repositories are commentable at its index page, after a discussion with community, we all decided to keep the issue as the only place for questions/discussions. Please check https://gitee.com/openeuler/community/issues/I19M8K for more. This PR is going to fix that. It adds a extra `commentable` section, default value is `false` of boolean type, support for setting if a repository is commentable. This new section is supported both in `repository/openeuler.yaml` and `repository/src-openeuler.yaml` under `openeuler/commmuntiy`. A example is shown below. ```yaml community: openeuler repositories: - name: A-Tune description: "" type: public commentable: false - name: ci-bot description: "" type: public commentable: true ``` For a better implementation, this PR has also done the following changes: 1. Update the go-gitee dependency to the latest version, see commmit https://gitee.com/openeuler/ci-bot/commit/6528ea212ea41b8640b121ac92cc8575780a3159 for reviewing. 2. Reduce the number of parameters for `addRepositoriesXXX` functions for better maintainability. 3. Because commentable and type are both the setting options of a repository that could be changed within a single gitee API, this PR is trying to handle them together within the function `handleRepositorySetting`. 4. Make some trivial code formats, such as using `strings.FormatBool()` function to reduce the if-else clauses. My test steps are: 1. Set the giteeToken and database related parameters in config.yaml to feasible values; 2. Fork `openeuler/community` project to `openkylin `organization which I have full access rights; 3. Fulfill the watchProjectFiles section in my local config.yaml with the ones I created in step 2; 4. Add/Change/Delete `type` and `commentable` options defined in `repository/openeuler.yaml` under `openkylin/community` project and push into Gitee; 5. Manually get the sha of `repository/openeuler.yaml` and update to my local mysql; 6. Check if the `type` and `commentable` are changed as expected;
怎样手动合并此 Pull Request
git checkout master
git pull https://gitee.com/imjoey/ci-bot.git repo_comment
git push origin master
评论
12
提交
2
文件
16
检查
代码问题
0
批量操作
展开设置
折叠设置
审查
Code Owner
审查人员
George.Cao
georgecao
chong_W
wangchong1995924
solarhu
solarhu
DisNight
disnight
TommyLike
TommyLike
杨超豪
yang-chaohao
余诗
yushi-Icy
未设置
最少人数
0
测试
George.Cao
georgecao
chong_W
wangchong1995924
solarhu
solarhu
DisNight
disnight
TommyLike
TommyLike
杨超豪
yang-chaohao
余诗
yushi-Icy
未设置
最少人数
0
优先级
不指定
严重
主要
次要
不重要
标签
openeuler-cla/yes
lgtm
approved
关联 Issue
I19M8K
Should we disable comment to the repositories
Pull Request 合并后将关闭上述关联 Issue
里程碑
未关联里程碑
参与者
(4)
Go
1
https://gitee.com/openeuler/ci-bot.git
git@gitee.com:openeuler/ci-bot.git
openeuler
ci-bot
ci-bot
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册