Skip to content

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

feat: add list with open pull requests on user profile pages #554

wants to merge 3 commits into from

Conversation

tudor07
Copy link

@tudor07 tudor07 commented Oct 22, 2017

Fixed #500

On user profile pages and on own profile page now there can be seen a list with open pull requests.

Copy link
Member

@chinesedfan chinesedfan left a 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>

Copy link
Member

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 = () => {
Copy link
Member

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');
Copy link
Member

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_.

Copy link
Member

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 = {
Copy link
Member

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,
Copy link
Member

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,
Copy link
Member

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.

@andrewda andrewda changed the title Added list with open pull requests on user profile pages feat: add list with open pull requests on user profile pages Oct 22, 2017
noItemsMessage={translate('repository.main.noOpenPullRequestsMessage', locale)}
>
{searchedUserOpenPullRequests.map(item =>
<IssueListItem
Copy link
Member

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!

Copy link
Member

@alejandronanez alejandronanez left a 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'}
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

See contributions and open PR’s on profile/homepage
3 participants