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

GitHub Contribution Guide #1028

Merged
merged 11 commits into from Aug 20, 2019

Conversation

@lock9
Copy link
Contributor

commented Aug 14, 2019

Hello,
I created a github contribution guide based on our github tags.
I hope this helps new developers to join our ecosystem.

Please review it here, otherwise you won't be able to see the images:
https://github.com/simplitech/neo/blob/contributing/CONTRIBUTING.md

Edit: Credits to Grace who helped me improve this

lock9 added 5 commits Aug 14, 2019
@codecov-io

This comment has been minimized.

Copy link

commented Aug 14, 2019

Codecov Report

Merging #1028 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1028   +/-   ##
=======================================
  Coverage   61.35%   61.35%           
=======================================
  Files         195      195           
  Lines       13405    13405           
=======================================
  Hits         8224     8224           
  Misses       5181     5181

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e792898...22e13f9. Read the comment docs.

lock9 added 2 commits Aug 14, 2019
@shargon
Copy link
Member

left a comment

Good and precise

@lock9

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

Hello,
Please do not merge this yet, I want to use high-resolution images (I will see if it is possible).

EDIT: Images are fine if you are seeing it blurred you 'have' to adjust your zoom settings.

@shargon

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

It is planned to add the coding style rules?

@igormcoelho
Copy link
Contributor

left a comment

Very good Ricardo, beautiful!

@igormcoelho

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2019

@lock9 I think this is an opportunity to "teach" a little bit of git and github plataform too.

I still struggle sometimes to make things right, so this is my personal guide (I never found on internet!).

==============
Some advices on git development (if you are an expert, or you have a better way, feel free to ignore this).

To contribute on Neo Project via GitHub, it is recommended to follow these steps:

  1. fork neo project on your own repo (let me call you john)
  2. clone your own neo project fork locally using ssh (with write access): git clone git@github.com:john/neo.git
  3. add upstream neo project locally using https (not ssh, to prevent direct write access): git remote add upstream https://github.com/neo-project/neo.git
  4. add each of your development colleagues (let me call her mary) locally using ssh (to allow write access): git remote add mary git@github.com:mary/neo.git

That's ready to go! Every time you need to sync your own fork, you can do (working on master here):

  1. git checkout master
  2. git pull , or git pull origin master (updates from your own fork)
  3. git pull upstream master (updates from neo master)
  4. git push, or git push origin master (update your own fork, with latest stuff on neo upstream)

If you are collaborating on mary's branch PR (called mary:feature-mary), you can do this:

  1. git fetch mary (get updates from mary)
    => you will get * [new branch] feature-mary -> mary/feature-mary
  2. git checkout feature-mary (change to feature-mary working branch)
  3. git pull (get updates from mary)
  4. add commits... and git push (this will automatically send updates via mary, not neo upstream)

To create a new feature or PR, you can do this:

  1. git checkout master (starting from master)
  2. git checkout -b myfeature (create a branch myfeature)
  3. add commits... and git push
    => it may ask you to define correct upstream: git push --set-upstream origin myfeature
    => you will be invited to create your PR on: https://github.com/john/neo/pull/new/myfeature

@shargon @lock9 @vncoelho if you have a better way, please let me know...

Do you think we should add this Ricardo?

@lock9

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

@igormcoelho I think it is good to have some guidance, but more like "GitHub vs private repositories" (the need to create a fork, sending a PR from your repo, etc.).
I think that people who are totally new to development can't help us, there is no need to adjust our message to this public.

I think that some "forking instructions" and "how to send a PR" may be helpful, but I don't think we need a "git guide" in our document.

@lock9

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

Guys, please wait for one more change too:
2 reviewers must approve the code before someone can merge it (Neo 3)
3 reviewers must approve the code before someone can merge it (Neo 2)
I will add this (improved) in this doc.
@igormcoelho I will also add basic fork & send PR instructions. Do you think that is enough?

@lock9 lock9 dismissed stale reviews from igormcoelho and shargon via 9e558fb Aug 14, 2019

@lock9

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

I've updated it to add a reference to this link: https://opensource.guide/how-to-contribute/#opening-a-pull-request and also added the reviewers rule.

@igormcoelho

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2019

In fact, I dont know if its useful to others rsrs its useful to me at least. Some colleagues and myself still struggle to contribute sometimes, and I'm afraid this "small thing" may prevent people from trying :)

Ricardo,did you learn something from the link you provided? I couldnt find useful information there.

@erikzhang

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

Where are the pictures used?

@vncoelho

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

I think it is good to have this file you proposed, @lock9, CONTRIBUTING.md, as well as the guidelines.

It is used like this, @erikzhang: https://github.com/simplitech/neo/blob/contributing/CONTRIBUTING.md

@igormcoelho

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

Where are the pictures used?

To represent each colored tag,and its meaning. If you click on the .md Vitor sent above, you'll see,its beautiful.

@lock9

This comment has been minimized.

Copy link
Contributor Author

commented Aug 15, 2019

@igormcoelho I understand that it is not easy to use git. There are a lot of features that I don't know and I often do things incorrectly.
The only reason I didn't add "complete instructions" is because I think this document is not meant to teach git.
The URL I added shows how to fork and send a PR, because this is the "real difference" between using private and a public repository.

@lock9 lock9 requested review from igormcoelho and shargon Aug 16, 2019

shargon and others added 2 commits Aug 20, 2019
@lock9

This comment has been minimized.

Copy link
Contributor Author

commented Aug 20, 2019

I'm merging this because after the 2 approvals I only fixed some typos.

@lock9 lock9 merged commit 7cc961b into neo-project:master Aug 20, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.