-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: Add fork PR workflows permission API support #3737
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3737 +/- ##
==========================================
+ Coverage 91.11% 91.14% +0.03%
==========================================
Files 187 187
Lines 16702 16764 +62
==========================================
+ Hits 15218 15280 +62
Misses 1296 1296
Partials 188 188 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes: #3660. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, @zyfy29 - thank you!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
cc: @stevehipwell - @alexandear
github/actions_workflows.go
Outdated
} | ||
|
||
// WorkflowApprovalPolicy represents the approval policy for workflows in a repository. | ||
type WorkflowApprovalPolicy struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we can think of a better name for the struct.
This struct is returned from the following functions:
- GetForkPRContributorApprovalPermissionsInEnterprise
- GetForkPRContributorApprovalPermissionsInOrganization
- GetForkPRContributorApprovalPermissions
And is used as a parameter in:
- UpdateForkPRContributorApprovalPermissionsInEnterprise
- UpdateForkPRContributorApprovalPermissionsInOrganization
- UpdateForkPRContributorApprovalPermissions
What about:
type WorkflowApprovalPolicy struct { | |
type ContributorApprovalPermissions struct { |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did hesitate here. ContributorApprovalPermissions
is a little confusing but better fits the method name and api path. I agree with you.
close #3660 since this is the last part of the permissions APIs announced there
Add support for fork PR workflow permission APIs, covering 6 endpoints.