From d8fca91d5cd2413d54b219054b467b6302087017 Mon Sep 17 00:00:00 2001 From: ph0zzy Date: Mar 16 2019 10:33:46 +0000 Subject: add pull requests page --- diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 649d128..c1e11ec 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -4,6 +4,7 @@ * xref:pipeline.adoc[Pipeline] * xref:standard-test-interface.adoc[Standard Test Interface] * xref:standard-test-roles.adoc[Standard Test Roles] +* xref:pull-requests.adoc[Pull Requests] * xref:examples.adoc[Examples] * xref:tests.adoc[Tests] * xref:faq.adoc[FAQ] diff --git a/modules/ROOT/pages/pull-requests.adoc b/modules/ROOT/pages/pull-requests.adoc new file mode 100644 index 0000000..a34cb1f --- /dev/null +++ b/modules/ROOT/pages/pull-requests.adoc @@ -0,0 +1,88 @@ +:toc: + += Pull Requests = + +Fedora is running https://pagure.io/pagure[pagure] on the top of its dist-git at https://src.fedoraproject.org[https://src.fedoraproject.org]. + +Having pagure on the top of dist-git means you can use the fork/pull-request workflow. +To use this workflow there are two situations to consider: + +== You are a packager == + +If you are a packager, you have ssh access to dist-git, so you can use pagure directly. +Find the repository you would like to contribute to, fork it via the *fork* button at the top right. +Wait a couple of minutes for the git repository and its access to be re-generated. +Clone locally using the ssh URL and interact with this git repo as you would do normally. + +== You are *NOT* a packager == + +Contributors that are not in the packager group cannot ssh into dist-git. +This is for security reasons and will not be changed. + +However, pagure on dist-git supports now pushing via https. + +For this you will need the following packages: + +* python-openidc-client >= 0.6.0 (available in updates-testing) + +* rpkg >= 1.55 (available in updates) + +* fedpkg >= 1.34 (available in updates) + +[NOTE] +==== +*Older Fedoras* + +On anything older than Fedora 29 (that is *Fedora 27*, *Fedora 28* and can be applied to *EPEL*), substitute `python3` with `python2` in the two commands below. +E.g. when it says `python3-openidc-client`, use `python2-openidc-client` instead, etc. +==== + +So check the version of the packages you have installed: + + rpm -q python3-openidc-client python3-rpkg fedpkg + +and potentially, update them: + + sudo dnf update python3-openidc-client fedpkg python3-rpkg --enablerepo=updates-testing + +To push via https, your git repository needs to be configured in a certain way (i.e. you need to have a `[credential]` section in your `.git/config`). +There are two ways you can have this. + +* Clone your git repo using + + fedpkg -a ++ +for example: + + fedpkg clone -a forks/pingoufpca/rpms/fedora-gather-easyfix ++ +In this case fedpkg will take care of setting up correctly your git repository allowing you to push using + + git push + +* Clone your git repo using + + git clone https://... ++ +and push using + + fedpkg push ++ +Here as well, fedpkg will take care of configuring correctly your git repository. + +[NOTE] +==== +*Username/Password* + +If you ever see the CLI asking you for an username and/or password, your git repo is not correctly configured. +The only place that should be asking you for an username and password is https://id.fedoraproject.org[https://id.fedoraproject.org] +==== + +== Open a pull-request == + +Once you have pushed your commits to your fork, you can navigate to your fork in the UI and open the pull-request using either the *New PR* button appearing next to the branch you pushed into or on the main page of the project. + +[NOTE] +==== +*Working with Pull Requests* + +You may encounter a situation where you want to include changes from the master branch that were made after you created your pull request. +Follow the article https://docs.pagure.org/pagure/usage/pull_requests.html#working-with-pull-requests[Working with Pull Requests] +====