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

Remove unnecessary parameter #162

Closed
wants to merge 1 commit into from

Conversation

aditya81070
Copy link

@aditya81070 aditya81070 commented Sep 21, 2018

fixes #137

@PrajwalM2212
Copy link
Member

@aditya81070 You need to follow the commit guidelines http://api.coala.io/en/latest/Developers/Writing_Good_Commits.html
Also your pull request does not indicate the issue you are solving.

@aditya81070
Copy link
Author

@PrajwalM2212 I will improve this in the future. Should I also change commit message for this time?

@PrajwalM2212
Copy link
Member

@aditya81070 You would be on the safer side if you changed your commit this time itself . I don't think they will merge the PR until commit message is changed.
git commit --amend -m "shortlog" -m "commit body" -m "issue reference"
You can refer http://api.coala.io/en/latest/Developers/Writing_Good_Commits.html on how to write shortlog, body and reference, but using the command that i gave you should do the job.

@aditya81070
Copy link
Author

@PrajwalM2212 I have changed the commit message.

Copy link

@rishabhgarg25699 rishabhgarg25699 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aditya81070 You have to make some changes. Firstly you can not have more than one commit in a single pull request and you have 3.You have to rebase all 3 commits by using git rebase -i HEAD~3 and then rebase in text editor.And secondly the commit message .Coala org is very strict in case of commit message.You must a 3 paragraph commit message .You can find a detailed desciption of commit message on https://api.coala.io/en/latest/Developers/Writing_Good_Commits.html . Its my personal suggestion you first read newcommer doc and git docs of coala.Please read fully https://api.coala.io/en/latest/Developers/Newcomers_Guide.html

Copy link

@srivama srivama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to squash all your comits into a single commit. Please refer to http://api.coala.io/en/latest/Developers/Git_Basics.html .

@aditya81070
Copy link
Author

@srivama @rishabhgarg25699 @PrajwalM2212 I have squashed three commits to one and also changed commit messages according to the Coala guidelines.

@@ -27,7 +27,7 @@ import {parseRoute, buildRoute} from './route-utils';
const routes = [
// Redirect from `/dashboard` to `/`
{ path: '/dashboard',
onEnter: (state, replace) => browserHistory.push('/')
Copy link
Member

@shikharvaish28 shikharvaish28 Sep 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why have you removed state?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this route, if the user hit the /dashboard path in URL then he will be directed to /. so in this function, we are not changing any state of the component. so it was used but its value is not used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The work of redirecting is done by history.push() function.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shikharvaish28 please review the pull request.

Copy link
Member

@li-boxuan li-boxuan Sep 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. However, the commit itself 3233746 has a problem. We should not use browserHistory here, but history

import history from './history';
instead.

It's okay if you leave your change as it is, since it is a newcomer issue. After this gets merged we create a new issue to replace browserHistory with history.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created an issue #163

Copy link
Member

@shikharvaish28 shikharvaish28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand so as to why have you removed state?

Copy link
Member

@li-boxuan li-boxuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your commit message is in wrong format.

@aditya81070
Copy link
Author

@li-boxuan I did the commit message according to the guide.

@aditya81070
Copy link
Author

@li-boxuan What should I do now?

Copy link
Member

@li-boxuan li-boxuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did the commit message according to the guide.

Nope, you don't. Fixes : #137 this is definitely wrong. Read the guide carefully.

The two arguments `state` and `onEnter` not required. In the route when `/dashboard` matches, it is directed to `/` using browserHistory.push().

Fixes coala#137
@aditya81070
Copy link
Author

@li-boxuan I have changed the commit message

@li-boxuan
Copy link
Member

This is not a bug so you should use Closes instead of Fixes.

@li-boxuan
Copy link
Member

@aditya81070 Are you still doing this?

@jayvdb
Copy link
Member

jayvdb commented Oct 11, 2018

@aditya81070 , needs a manual rebase to resolve conflicts

See https://coala.io/git

@aditya81070
Copy link
Author

@jayvdb Okay I am doing this.

@jayvdb
Copy link
Member

jayvdb commented Feb 3, 2019

Abandoned.

@jayvdb jayvdb closed this Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

router.jsx 'replace' is defined but never used
8 participants