-
Notifications
You must be signed in to change notification settings - Fork 784
feat: add list with open pull requests on user profile pages #554
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
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.
@radiKal07 Nice job and welcome to become a new contributor! But maybe we need to discuss the design first. Pending the PR list at the end of own profile seems not to be the best idea, especially we may need closed PR list and open/closed issue list in future.
#500 doesn't require a PR list for other user's profile, which keeps the same with Github. It expects something like contribution calendar.
At last, package-lock.json
can be removed, because we use yarn
.
/> | ||
)} | ||
</SectionList> | ||
|
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.
Usually, we only care about our PRs, but do not for other users'.
@@ -157,6 +159,34 @@ export const getUserEvents = user => { | |||
}; | |||
}; | |||
|
|||
export const searchUserOpenPullRequests = () => { |
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 suggest to rename as getOpenPullRequest
, which is simpler and more similar with other functions.
@@ -7,3 +7,4 @@ export const GET_AUTH_ORGS = createActionSet('GET_AUTH_ORGS'); | |||
export const GET_EVENTS = createActionSet('GET_EVENTS'); | |||
export const CHANGE_LOCALE = createActionSet('CHANGE_LOCALE'); | |||
export const GET_AUTH_STAR_COUNT = createActionSet('GET_AUTH_STAR_COUNT'); | |||
export const SEARCH_USER_OPEN_PULL_REQUESTS = createActionSet('SEARCH_USER_OPEN_PULL_REQUESTS'); |
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.
Similar here. Let's make actions start with GET_
.
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.
GET_USER_OPEN_PULL_REQUESTS
maybe.
@@ -7,6 +7,7 @@ import { | |||
GET_EVENTS, | |||
CHANGE_LOCALE, | |||
GET_AUTH_STAR_COUNT, | |||
SEARCH_USER_OPEN_PULL_REQUESTS, | |||
} from './auth.type'; | |||
|
|||
const initialState = { |
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'd better add an initial value here.
case SEARCH_USER_OPEN_PULL_REQUESTS.PENDING: | ||
return { | ||
...state, | ||
isPendingSearchUserOpenPullRequests: true, |
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 field can be renamed correspondingly.
user: Object, | ||
orgs: Array, | ||
searchedUserOpenPullRequests: Array, |
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.
searchUserOpenPullRequests
and searchedUserOpenPullRequests
are really easy to be mixed.
noItemsMessage={translate('repository.main.noOpenPullRequestsMessage', locale)} | ||
> | ||
{searchedUserOpenPullRequests.map(item => | ||
<IssueListItem |
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.
Can you please add the key
prop for IssueListItem
? Thanks!
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.
- Please add
key
prop when iterating a list of components.
> | ||
{searchedUserOpenPullRequests.map(item => | ||
<IssueListItem | ||
type={'git-pull-request'} |
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.
Add key
prop in here please.
Fixed #500
On user profile pages and on own profile page now there can be seen a list with open pull requests.