-
Notifications
You must be signed in to change notification settings - Fork 36
Updating a file and creating a pull request using the GitHub web app
Note: images will be added later...alterations and clarifications are welcome :) -mapcat
To edit a .wpt file using the GitHub web app, first navigate to the folder containing the file you wish to update.
From TravelMapping, select the HighwayData repository
Navigate to your fork of the project by clicking "Fork" at the top right of the page and selecting your fork.
From HighwayData in your fork, select the hwy_data folder
The hwy_data folder contains folders for each TM region. Select the region that includes the highway you wish to edit. If you generally only edit highways in one region, save the region's folder as a bookmark in your browser.
In the regional folder (AB for example), you'll see all of the systems that have been developed in that region. Select the system that includes the highway you wish to edit (such as canab). Make sure that the drop-down menu above the list says Branch:master. Select a file from the list. The code will appear in a box. Directly above the box on the right is a pencil image. Click the pencil, and the code becomes editable.
If the edit is minor, such as changing the name of a waypoint, you will probably find it easiest to simply edit the relevant line of code in the web app. However, if you are moving waypoints or shaping points, or inserting new ones, it is much easier to use the CHM waypoints editor.
(link to "how to use the waypoints editor" will go here)
Please note that if a waypoint is in use, you must maintain it as a deprecated label. Insert the new waypoint name on the line in front of it, and place a + directly ahead of the old name (no space).
(link to "how to determine if a waypoint is in use" will go here)
Once you're finished making changes to the file, it's time to commit the changes. Make sure that the "Commit directly to the master branch" radio button below the edit box is selected, then click the green Commit changes button.
Once you have finished editing files, you can create a pull request. Navigate back to the Highway Data repository in your fork, and below the green "Create Pull Request" button you should see a statement regarding the changes you made: "This branch is XX commits ahead of TravelMapping: master". The XX should reflect the number of files you just edited. To the right of that statement are links to Pull Request and Compare. Click Compare to see a list of the files you edited. Click on each file name to see the edits you made. The old and new versions of each file appear side-by-side: on the left, the text you removed is highlighted in pink, and on the right, the text you added is in green.
If everything looks right, navigate back to the Highway Data repository in your fork and hit the green Create pull request button. Name the pull request (or use the default if it's not ambiguous) and, optionally, add a comment. Hit Create pull request again and the pull request will be added. If the administrator approves it, your edited file(s) will be merged with the master.
(link to "when and how to add a line to the Updates list" will go here)