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

[Feature] Show approved (by me) Pull Requests #65

Closed
apoclyps opened this issue May 2, 2021 · 0 comments · Fixed by #67
Closed

[Feature] Show approved (by me) Pull Requests #65

apoclyps opened this issue May 2, 2021 · 0 comments · Fixed by #67
Labels
enhancement New feature or request python Pull requests that update Python code

Comments

@apoclyps
Copy link
Owner

apoclyps commented May 2, 2021

Is your feature request related to a problem? Please describe.
I would like to see which pull requests have been approved by me and those approved by others.

This will replace the existing status column with 2 new columns.

The first column Approved column should check if the pull request is approved by a user-provided via configuration.

if it has been approved by the config.user in the list of objects returned by pull_request.get_reviews().

The second Ready to Release column should check

if it has been approved by others if the config.user is not in the list of objects returned by pull_request.get_reviews().

Describe the solution you'd like
I would like to have a status column for Approved and Ready to Release.

Additional context

Existing approved status is set here:

approved=any(pull_request.get_reviews()), # NOQA: R1721

this will request changes to the PullRequest data class in

@dataclass
class PullRequest:
"""Models a Pull Request"""
number: int
title: str
created_at: datetime
updated_at: datetime
approved: bool
labels: List[Label] = field(default_factory=list)
to add the additional fields and to remove status.

A configurable user can be set via an environmental variable and used by defining it within:

# Application Config
DELAY_REFRESH = config("DELAY_REFRESH", cast=int, default=60)
ENABLE_NOTIFICATIONS = config("ENABLE_NOTIFICATIONS", cast=bool, default=False)
ENABLE_PERSISTED_DATA = config("ENABLE_PERSISTED_DATA", cast=bool, default=False)
REPOSITORY_CONFIGURATION = config(
"REPOSITORY_CONFIGURATION",
cast=Csv(),
default="apoclyps/code-review-manager",
)

@apoclyps apoclyps added enhancement New feature or request python Pull requests that update Python code labels May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
yushao2 added a commit to yushao2/reviews that referenced this issue May 2, 2021
apoclyps pushed a commit that referenced this issue May 2, 2021
* Feature-#65: Show approved (by user) status

* Feature-#65: Updated docs and tests for changes in environments and schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant