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

ci: appoint PR reviewers via action bot reviews #9913

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kurisaW
Copy link
Contributor

@kurisaW kurisaW commented Jan 14, 2025

拉取/合并请求描述:(PR description)

[

为什么提交这份PR (why to submit this PR)

Ps:由于使用CI机器人自动任命审核者需要被任命的审核者拥有仓库的一些读写权限,所以换一种方式来通知PR审核,通过CI自动识别PR中的label来任命审核人。

你的解决方案是什么 (what is your solution)

使用方式:维护者可以通过修改仓库目录下的 .github\label-reviewers.json 文件,通过修改对应的键值,可实现对审核者的通知:

例如:

{
    "label1": "@reviewer1, @reviewer2, @reviewer3, @reviewer4, ...,"
    "label2": "@reviewer1, @reviewer2, @reviewer3",
    "label3": "@reviewer1, @reviewer2",
    "label4": "@reviewer1"
}

CI脚本特性:

  • 解决多个label中存在重复reviewer时的重复@提及问题
  • 当手动修改label时会再次自动触发CI
  • 支持一个label对应多个reviewer
  • 通过修改label-reviewers.json可简单完成不同label特性的PR审核人任命

请提供验证的bsp和config (provide the config and bsp)

  • BSP:
  • .config:
  • action:

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查

@kurisaW kurisaW requested a review from supperthomas as a code owner January 14, 2025 05:48
@github-actions github-actions bot added the action github action yml imporve label Jan 14, 2025
@kurisaW kurisaW marked this pull request as draft January 14, 2025 05:51
@kurisaW kurisaW force-pushed the auto-reviewer branch 3 times, most recently from 3e75f0a to 8d799f2 Compare January 14, 2025 06:09
@kurisaW kurisaW marked this pull request as ready for review January 14, 2025 06:20
@Rbb666 Rbb666 added action github action yml imporve and removed action github action yml imporve labels Jan 14, 2025
@Rbb666 Rbb666 requested a review from mysterywolf January 14, 2025 06:30
@Rbb666 Rbb666 added the BSP: Renesas BSP related with Renesas label Jan 14, 2025
@Rbb666 Rbb666 marked this pull request as draft January 14, 2025 07:05
@supperthomas
Copy link
Member

你这个要加RTTHREAD_GITHUB_TOKEN的吧

@kurisaW
Copy link
Contributor Author

kurisaW commented Jan 14, 2025

你这个要加RTTHREAD_GITHUB_TOKEN的吧

token加了的:

image

但是还不清楚为什么这个仓库解析出了问题:

image

然后在我自己的仓库测试中是可以的,等我找时间再看看:

image

@supperthomas
Copy link
Member

目前这个仓库里面的RTTHREAD_GITHUB_TOKEN 加了吗?还没有加吧?

@kurisaW
Copy link
Contributor Author

kurisaW commented Jan 15, 2025

目前这个仓库里面的RTTHREAD_GITHUB_TOKEN 加了吗?还没有加吧?

应该是有的吧,我是看其他ci文件中有这个token在,然后用的这个,不知道我上面的问题会不会是因为这个token无效导致的

image

@supperthomas
Copy link
Member

目前这个仓库里面的RTTHREAD_GITHUB_TOKEN 加了吗?还没有加吧?

有的,我是看ci文件中有这个token在,然后用的这个,不然没法通过权限的

没有的,那个是我加的。token你找熊大加一下。

@kurisaW
Copy link
Contributor Author

kurisaW commented Jan 15, 2025

目前这个仓库里面的RTTHREAD_GITHUB_TOKEN 加了吗?还没有加吧?

有的,我是看ci文件中有这个token在,然后用的这个,不然没法通过权限的

没有的,那个是我加的。token你找熊大加一下。

噢噢好的,那我另设一个

@supperthomas
Copy link
Member

目前这个仓库里面的RTTHREAD_GITHUB_TOKEN 加了吗?还没有加吧?

有的,我是看ci文件中有这个token在,然后用的这个,不然没法通过权限的

没有的,那个是我加的。token你找熊大加一下。

噢噢好的,那我另设一个

不是我的意思是你还是用RTTHREAD_GITHUB_TOKEN 这个就可以了。这个settings里面的值没有赋值。

@kurisaW
Copy link
Contributor Author

kurisaW commented Jan 15, 2025

@BernardXiong 熊大,麻烦帮忙添加个名为 GITHUB_TOKEN_COMMENT 的token可以嘛,只需要拥有对仓库的评论权限就可以了

@kurisaW kurisaW marked this pull request as ready for review January 16, 2025 01:14
@kurisaW kurisaW closed this Jan 16, 2025
@kurisaW kurisaW reopened this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action github action yml imporve BSP: Renesas BSP related with Renesas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants