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

feat: add allow-permissions #46

Merged
merged 4 commits into from
Jan 26, 2021
Merged

feat: add allow-permissions #46

merged 4 commits into from
Jan 26, 2021

Conversation

xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Jan 26, 2021

🤔 这个变动的性质是?/ What is the nature of this change?

  • 新特性提交 / New feature
  • bug 修复 / Fix bug
  • 样式优化 / Style optimization
  • 代码风格优化 / Code style optimization
  • 性能优化 / Performance optimization
  • 构建优化 / Build optimization
  • 网站、文档、Demo 改进 / Website, documentation, demo improvements
  • 重构代码或样式 / Refactor code or style
  • 测试相关 / Test related
  • 其他 / Other

🔗 相关 Issue / Related Issue

💡 需求背景和解决方案 / Background or solution

allow-permissions 可选值为 admin, write, read, and none.

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese 新增 allow-permissions 用于处理 duplicate 的时候

☑️ 请求合并前的自查清单 / Self Check before Merge

⚠️ 请自检并全部勾选全部选项。/ Please check all items below before review. ⚠️

  • 文档已补充或无须补充 / Doc is updated/provided or not needed
  • 代码演示已提供或无须提供 / Demo is updated/provided or not needed
  • TypeScript 定义已补充或无须补充 / TypeScript definition is updated/provided or not needed
  • Changelog 已提供或无须提供 / Changelog is provided or not needed

@github-actions
Copy link

github-actions bot commented Jan 26, 2021

🎊 PR Preview f9b6c63 has been successfully built and deployed to https://actions-cool-issues-helper-preview-pr-46.surge.sh

🕐 Build time: 78.335s

🤖 By surge-preview

@xrkffgg xrkffgg merged commit f777971 into main Jan 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the up branch January 26, 2021 09:55
@fisker
Copy link

fisker commented Jan 26, 2021

I think better named require-permissions.

Do you think default value should be ["admin", "write"]?

@xrkffgg
Copy link
Member Author

xrkffgg commented Jan 26, 2021

OK 我今晚改一下,换成 require-permissions 这名字

你的想法是 require-permissions 默认情况不传,就是 admin write ?

不过 这个 action https://github.com/mui-org/material-ui 在用,当时他们没有考虑到 用户权限的问题,如果不传就默认 admin write,会对他们造成影响。虽然他们在用的时候,只有 member 在回复。

@fisker
Copy link

fisker commented Jan 26, 2021

发布2.0

@fisker
Copy link

fisker commented Jan 26, 2021

require-permission 可能更好, 因为只要其中一个权限.

@xrkffgg
Copy link
Member Author

xrkffgg commented Jan 26, 2021

可以,正有此意。

我晚上弄好了,再更新你那的 PR。

@fisker
Copy link

fisker commented Jan 26, 2021

另外更新 Prettier Pr 的时候, 写死版本号, 我们都用固定版本, 有 bot 会更新.

@fisker
Copy link

fisker commented Jan 26, 2021

admin 是不是一定有 write? 然后 write 是不是一定有 read? 那是不是只要 write 就包含了 admin?

@fisker
Copy link

fisker commented Jan 26, 2021

如果这样, require-write-permission boolean 就可以了, 默认 true

@xrkffgg
Copy link
Member Author

xrkffgg commented Jan 26, 2021

admin 是一定有 write,但是在用 API 查看 某个 user 的时候,结果是一个确定的值。

@xrkffgg
Copy link
Member Author

xrkffgg commented Jan 26, 2021

我可以 人为来控制

@xrkffgg
Copy link
Member Author

xrkffgg commented Jan 26, 2021

那确定用 require-write-permission

@fisker
Copy link

fisker commented Jan 26, 2021

我觉得够了,应该不会有repo会要求只能admin吧

@xrkffgg
Copy link
Member Author

xrkffgg commented Jan 26, 2021

其实我更倾向于 require-permission 可配置,默认 write 以上

@fisker
Copy link

fisker commented Jan 26, 2021

都可以

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.

2 participants