ogr
ogr copied to clipboard
user's permissions on Issues/PRs
Updated by @lachmanfrantisek :
We have a lot of methods related to the permissions (e.g. who can merge/close,..)
It's not consistent, let's clean that!
Feel free to solve this in smaller parts. Just write on what you are going to work...
AC:
- [ ] Make sure, that we have all of the provided methods in the
abstract.py
(raising theNotImplementedError
) - [ ] Make sure, that we have all of these in all the implementations:
- [ ] GitLab
- [ ] GitHub
- [ ] Pagure
- [ ] Deprecate the project methods related to specific issue/pull-request.
- [ ] Move helping methods to the base classes.
- The only exception is a more efficient solution in the code of the specific implementation.
- Example: https://github.com/packit-service/ogr/blob/89435655150b8dd79ef93209c3463585d0715e0d/ogr/services/github/project.py#L219-L220
The progress is tracked in the following tables. (Any update in the comments is appreciated.)
Project | who_can_close_issue() -> Set[str] |
who_can_merge_pr() -> Set[str] |
can_close_issue(username: str) -> bool |
can_merge_pr(username: str) -> bool |
---|---|---|---|---|
abstract | :+1: | :+1: | :exclamation: deprecate the Issue argument |
|
base | nothing | nothing | implement here | implement here |
Github | ? | ? | ? | ? |
GitLab | ? | ? | ? | ? |
Pagure | ? | ? | ? | ? |
Issue | who_can_close() -> Set[str] |
can_close(username: str) -> bool |
---|---|---|
abstract | ? | ? |
base | nothing | implement here |
Github | ? | ? |
GitLab | ? | ? |
Pagure | ? | ? |
PullRequest | who_can_close() -> Set[str] |
who_can_merge() -> Set[str] |
can_close(username: str) -> bool |
can_merge(username: str) -> bool |
---|---|---|---|---|
abstract | ? | ? | ? | ? |
base | nothing | nothing | implement here | implement here |
Github | ? | ? | ? | ? |
GitLab | ? | ? | ? | ? |
Pagure | ? | ? | ? | ? |
Isn't this already fixed for GitHub and Pagure?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
We are doing this to be sure that the issue is still relevant. Anyone can comment to remove the stale state. (The issues marked with pinned
, security
, bug
or EPIC
label
are not considered stale.)
- We have it in Gitlab as well.
- We have
can_merge_pr
/who_can_merge_pr
/who_can_close_issue
methods in the project classes.
Can we close this issue?
Or, do we want/need related methods in Issue/PR classes as well? (my_issue.who_can_close
/issue_can_close("username")
)
I've updated the description. This issue is now about cleaning the methods and add the missing parts. Please, check if I don't forget anything.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
We are doing this to be sure that the issue is still relevant. Anyone can comment to remove the stale state. (The issues marked with pinned
, security
, bug
or EPIC
label
are not considered stale.)