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(Changeset): auto add label #427

Merged
merged 11 commits into from
Dec 31, 2023
Merged

ci(Changeset): auto add label #427

merged 11 commits into from
Dec 31, 2023

Conversation

thinkasany
Copy link
Collaborator

@thinkasany thinkasany commented Dec 30, 2023

好像还缺少一些权限

接口文档: https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28

image

我用自己的账号写了个demo

thinkasany/PR-template#1

add label

image

remove label

image

详细ci流程

add label

image

remove label

image

Copy link

changeset-bot bot commented Dec 30, 2023

⚠️ No Changeset found

Latest commit: c38857c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ant-design-web3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2023 5:39am

Copy link

Copy link

codecov bot commented Dec 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (33fa8e5) 98.70% compared to head (c38857c) 98.70%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #427   +/-   ##
=======================================
  Coverage   98.70%   98.70%           
=======================================
  Files          72       72           
  Lines        3620     3620           
  Branches      357      357           
=======================================
  Hits         3573     3573           
  Misses         45       45           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thinkasany thinkasany marked this pull request as draft December 30, 2023 02:43
@kiner-tang
Copy link
Member

应该不用这么麻烦,用这个 action 试试:
image
https://github.com/actions-cool/issues-helper/tree/v3/?tab=readme-ov-file#create-label

@thinkasany
Copy link
Collaborator Author

应该不用这么麻烦,用这个 action 试试: image https://github.com/actions-cool/issues-helper/tree/v3/?tab=readme-ov-file#create-label

应该不用这么麻烦,用这个 action 试试: image https://github.com/actions-cool/issues-helper/tree/v3/?tab=readme-ov-file#create-label

好的,我去用我自己的仓库先试试这个。

@thinkasany
Copy link
Collaborator Author

@kiner-tang 这个token应该是有点权限不足,帮忙看看。我自己的账号也换成actions-cool/issues-helper@v3的语法了,原来的sh代码也只是调用一下github接口。https://github.com/thinkasany/PR-template/pulls
image
image

@kiner-tang
Copy link
Member

@kiner-tang 这个token应该是有点权限不足,帮忙看看。我自己的账号也换成actions-cool/issues-helper@v3的语法了,原来的sh代码也只是调用一下github接口。https://github.com/thinkasany/PR-template/pulls image image

我看看

@thinkasany thinkasany added test and removed test labels Dec 30, 2023
@kiner-tang
Copy link
Member

kiner-tang commented Dec 30, 2023

@kiner-tang 这个token应该是有点权限不足,帮忙看看。我自己的账号也换成actions-cool/issues-helper@v3的语法了,原来的sh代码也只是调用一下github接口。https://github.com/thinkasany/PR-template/pulls image image

我看看

image

https://docs.github.com/zh/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization#%E9%99%90%E5%88%B6fine-grained-personal-access-token%E7%9A%84%E8%AE%BF%E9%97%AE

这个好像要 ant design 组织的管理员才可以设置的,我这边没权限。
@yutingzhao1991 你这边有权限吗?

@yutingzhao1991
Copy link
Collaborator

我看看

@yutingzhao1991
Copy link
Collaborator

image

我也没有权限,估计得找 @afc163

不过按道理我们的操作都是针对这个仓库的,不应该需要组织权限设置什么才对?

@kiner-tang
Copy link
Member

image 我也没有权限,估计得找 @afc163

不过按道理我们的操作都是针对这个仓库的,不应该需要组织权限设置什么才对?

如果这个问题不解决,又会遇到之前的 fork 下来的项目没权限执行的问题

@thinkasany
Copy link
Collaborator Author

image 我也没有权限,估计得找 @afc163

不过按道理我们的操作都是针对这个仓库的,不应该需要组织权限设置什么才对?

不确定是不是这个token缺少issue的权限,因为我以前在其他仓库加过auto label的功能是正常表现的。
image
image
内部成员打core team,外部没有,所以正常fork的也能用才对。
image

@yutingzhao1991
Copy link
Collaborator

image 我也没有权限,估计得找 @afc163 不过按道理我们的操作都是针对这个仓库的,不应该需要组织权限设置什么才对?

如果这个问题不解决,又会遇到之前的 fork 下来的项目没权限执行的问题

现在 fork 的项目也可以执行 ci 的,权限也都有,只是需要我们手动点一下 approve。之前那个问题也很奇怪,只是 start preview 的评论没办法发出来,但是成功和失败的都可以。真的很奇怪,感觉可能是哪个细节我们没配置好。

@yutingzhao1991
Copy link
Collaborator

另外关于这个问题还有一个解决思路,就是在发布之前加一个脚本检测一下,做下二次确认。至少不会直接发错。这个感觉应该是 changeset 来支持,很奇怪它居然都没有确认。我去提个 issue 先。

@kiner-tang
Copy link
Member

kiner-tang commented Dec 31, 2023

另外关于这个问题还有一个解决思路,就是在发布之前加一个脚本检测一下,做下二次确认。至少不会直接发错。这个感觉应该是 changeset 来支持,很奇怪它居然都没有确认。我去提个 issue 先。

先看一下这个:

  • chore: changelog check ci #430
    请请教了一下其他同学,说这样改就可以,不过得把分支合并过去之后,才能生效,当前 pr 不生效,要不要试一下呢?

@kiner-tang
Copy link
Member

@thinkasany 应该可以了,你把 changelog 文件删掉,我把代码合并过去,应该就可以打标签了

@kiner-tang kiner-tang marked this pull request as ready for review December 31, 2023 05:37
@kiner-tang kiner-tang merged commit 6262ce6 into ant-design:main Dec 31, 2023
7 checks passed
@kiner-tang
Copy link
Member

应该好了
添加:
image
image
删除:
image

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