Skip to content

Commit

Permalink
Add How-to test a contributor Pull Request
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdichaouch committed Apr 22, 2021
1 parent 8e7b74b commit a89e618
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thank you so much for contributing to the project. All contributions are
welcome. Please take a moment to review these guidelines. Following them will
ensure the contribution process is easy and effective for everyone involved.

## How to contribute to Pynab
## How-to contribute to Pynab

### Reporting bugs

Expand Down Expand Up @@ -45,6 +45,21 @@ tagged [`good first issue`](https://github.com/nabaztag2018/pynab/issues?q=is%3A
They have been especially selected as they seem not too difficult at first
sight.

## How-to test a contributor Pull Request (PR)

1. Connect to your Nabaztag 🐰: `ssh pi@nabaztag.local`
2. Go to the pynab folder: `cd /home/pi/pynab`
3. List references in a remote repository: `git ls-remote --refs origin`
4. Open [Pull Request (PR) page](https://github.com/nabaztag2018/pynab/pulls) and memorize the PR number you want to test
5. Switch to the PR code, here PR #123, change number for your test: `git fetch origin pull/123/head:pr/123 && git checkout pr/123`

This comment has been minimized.

Copy link
@f-laurens

f-laurens May 3, 2021

Contributor

should rather be something like:
git checkout master && git pull origin master && git fetch origin pull/123/head:pr/123 && git checkout pr/123 && git merge master
to ensure having current state of master branch plus commits from given PR.

This comment has been minimized.

Copy link
@mehdichaouch

mehdichaouch May 3, 2021

Author Contributor

that depend, if pr/123 is up to date with master no need to do that otherwise it'll be necessary.
Moreover, depends on how is the merging/releasing management and if contributor are able to maintain PR update with master.

This comment has been minimized.

Copy link
@f-laurens

f-laurens May 3, 2021

Contributor

that depend, if pr/123 is up to date with master no need to do that otherwise it'll be necessary.

Indeed. That's why we should make sure the instructions provided apply to all cases.

This comment has been minimized.

Copy link
@mehdichaouch

mehdichaouch May 3, 2021

Author Contributor

I'm agreed.
I wrote this when I started working on this project because nothing was written, but feel free to make changes.

6. Restart Nabaztag deamon: `sudo systemctl restart nabd`
7. Do your test 🚦
8. Rollback to default branch: `git checkout release`
9. Restart Nabaztag deamon: `sudo systemctl restart nabd`
10. All done ! 🎉

Then add comments on pull request 😉.

## How-to work with GitHub and Pull Requests

You can develop directly on your rabbit (RasperryPi) that you have of course
Expand Down Expand Up @@ -94,10 +109,10 @@ GitHub will display the URL to create a pull request, with a git message such
as:

```
remote:
remote:
remote: Create a pull request for 'branch-name' on GitHub by visiting:
remote: https://github.com/user/pynab/pull/new/branch-name
remote:
remote:
```

If you have a [Travis](http://travis-ci.org/) account and configured it to work
Expand Down

0 comments on commit a89e618

Please sign in to comment.