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

Refactor Linux version parsing #702

Closed
dbwiddis opened this Issue Dec 2, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@dbwiddis
Member

dbwiddis commented Dec 2, 2018

I'm marking this issue for first-timers-only. That means that I will only accept a PR for this one from someone who's never contributed to open source before. This one is easy (but don't make that statement make you feel bad if you have a hard time with it, there's more to contributing to open source than changing lines of code, especially if it's your first time). I'll hold your hand through this if you need me to. :-) Here are the steps to get a PR merged here.

  • Read the CONTRIBUTING file for reference. I'll walk you through anything you don't understand.
  • Find the LinuxOSVersionInfoEx.java class.
  • Look at lines 149, 165, 213, 219, and 222 which reduce the String to the value between quotation marks.
  • Find the ParseUtil.java class.
  • Create a method similar to getSingleQuoteStringValue() which parses Double Quotes.
  • Optionally, refactor getSingleQuoteStringValue() and your new method to use getStringBetween() which is more efficient than the split().
  • Write a test for the new method in the ParseUtilTest.java class.
  • Replace the code in the 5 lines above to call the new method.
  • Fork the project, commit your changes to your fork, create a PR, and get it merged
  • Celebrate
@hemanshu070

This comment has been minimized.

Contributor

hemanshu070 commented Dec 2, 2018

Hi Db, I'm new to this whole contribution thing so is there anywhere I assign this issue to myself.

@dbwiddis

This comment has been minimized.

Member

dbwiddis commented Dec 2, 2018

Hey there, @hemanshu070 . In the upper right corner of this page, just above the labels, is an assignment section. You're welcome to assign it to yourself, although now that you've stated so in the comments, it's likely others will know you're working on it as well!

@hemanshu070

This comment has been minimized.

Contributor

hemanshu070 commented Dec 4, 2018

Thanks, I am stuck here with one more thing, I made all the changes as asked and when i was pushing the changes using the command "git push origin Refactor-Linux-version-parsing", It threw 403 error. I have checked with the internet but could not comeup with the solution.
This is the stacktrace of the error in the terminal that i am getting

"him@him:$ cd oshi
him@him:
/oshi$ git push origin Refactor-Linux-version-parsing
Username for 'https://github.com': hemanshu070
Password for 'https://hemanshu070@github.com':
remote: Permission to oshi/oshi.git denied to hemanshu070.
fatal: unable to access 'https://github.com/oshi/oshi.git/': The requested URL returned error: 403"

@dbwiddis

This comment has been minimized.

Member

dbwiddis commented Dec 4, 2018

It looks like you're trying to commit directly to the oshi repository on github rather than to your own respository. You should have the oshi project as your upstream but your own repository, https://github.com/hemanshu070/oshi.git/ as the origin. See if these instructions help you square those away.

shanmukhateja added a commit to shanmukhateja/oshi that referenced this issue Dec 8, 2018

hemanshu070 added a commit to hemanshu070/oshi that referenced this issue Dec 10, 2018

hemanshu070 added a commit to hemanshu070/oshi that referenced this issue Dec 10, 2018

hemanshu070 added a commit to hemanshu070/oshi that referenced this issue Dec 10, 2018

hemanshu070 added a commit to hemanshu070/oshi that referenced this issue Dec 10, 2018

@hemanshu070

This comment has been minimized.

Contributor

hemanshu070 commented Dec 10, 2018

It looks like you're trying to commit directly to the oshi repository on github rather than to your own respository. You should have the oshi project as your upstream but your own repository, https://github.com/hemanshu070/oshi.git/ as the origin. See if these instructions help you square those away.

Thanks , you were right, The basic issue was that I did not fork this repository. I have opened a pull request and also updated the change.log

one more question @dbwiddis . Do we follow the same basic thing across all open source contributions?

@dbwiddis

This comment has been minimized.

Member

dbwiddis commented Dec 11, 2018

Generally, yes... you'll fork it to your own repository and commit there, and submit a pull request from github. Any additional commits to your own repository will update the PR. Also by default, the project you are submitting your PR to can also commit to your branch for the changed files (essentially updating your PR).

hemanshu070 added a commit to hemanshu070/oshi that referenced this issue Dec 13, 2018

@dbwiddis dbwiddis closed this in 0183173 Dec 13, 2018

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