-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add pull requests component #92
base: develop
Are you sure you want to change the base?
Add pull requests component #92
Conversation
|
||
|
||
export interface PullRequestLabel { | ||
name?: string; |
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.
Is there a way to make it not optional? I think if it exists it is always defined with name
and color
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.
This seems to be a general issue with JPA as OpenAPI Java-Variables can always be null implicitly. It applies to all our other model interfaces too.
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Embeddable |
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.
So this means that there is no separate table for it am I right?
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.
yes, but we could also create an own table for labels if we think that it is necessary. but then we have to handle the labels more
webapp/src/app/ui/pull-request-widget/pull-request-widget.component.html
Outdated
Show resolved
Hide resolved
webapp/src/app/ui/pull-request-widget/pull-request-widget.component.html
Outdated
Show resolved
Hide resolved
webapp/src/app/ui/pull-request-widget/pull-request-widget.component.html
Outdated
Show resolved
Hide resolved
webapp/src/app/ui/pull-request-widget/pull-request-widget.component.html
Outdated
Show resolved
Hide resolved
webapp/src/app/ui/pull-request-widget/pull-request-widget.component.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/ui/pull-request-widget/pull-request-widget.stories.ts
Outdated
Show resolved
Hide resolved
We also have colors defined for border and card that you can make use off |
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 wasn't able to run storybook in the currently version due to a naming conflict of the number
/prNumber
-variable.
I would recommend that you rebase the branch to develop
as it already contains the number
-attribute.
@@ -36,6 +30,9 @@ public class PullRequest extends BaseGitServiceEntity { | |||
@NonNull | |||
private String url; | |||
|
|||
@NonNull | |||
private int prNumber; |
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 already included the number
-variable this in another PR . When you bring this branch up-to-date with develop
you can just use that one instead.
|
||
|
||
export interface PullRequestLabel { | ||
name?: string; |
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.
This seems to be a general issue with JPA as OpenAPI Java-Variables can always be null implicitly. It applies to all our other model interfaces too.
<div class="border border-gray-300 rounded-lg p-4 w-72"> | ||
<div class="flex justify-between items-center mb-2 text-xs text-gray-500"> | ||
<span class="font-bold flex justify-center items-center space-x-1"> | ||
<ng-icon [svg]="octGitPullRequest" size="16" class="mr-1"></ng-icon> {{ pullRequest().repository.name }} #{{ pullRequest().number }} on {{ pullRequest().createdAt }} |
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.
You have to handle the null
-case for the repository here to avoid a compiler error.
I'd be fine with simple optional chaining:
{{ pullRequest().repository?.name }}
Motivation
Adds a pull request widget component and the necessary data to display pull requests of a user
Description
Screenshots (if applicable)
Checklist
General
Client (if applicable)
Server (if applicable)