name: Check User Permission
on:
issues:
types: [opened, edited]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions-cool/check-user-permission@v2
Name | Desc | Type | Required |
---|---|---|---|
token | GitHub token | string | โ |
require | Test whether the user meets the required permission | string | โ |
username | Obtained from the context by default, can also be customized to pass in | string | โ |
check-bot | Check whether the user is a bot | boolean | โ |
check-contributor | Check whether the user is contributor | boolean | โ |
admin
> write
> read
username
support github context
actor
: The Defaulttriggering_actor
: The username of the user that initiated the workflow run even re-runusername: github.triggering_actor
user-permission
: read
| write
| admin
require-result
: The result of require true
| false
check-result
: The result of check true
| false
How to use?
You are very welcome to try it out and put forward your comments. You can use the following methods:
check-user-permission
ๆฌข่ฟๅ ๅ ฅ ้้ไบคๆต็พค