|
| 1 | +--- |
| 2 | +title: "4.3 Fixing a Repository Issue" |
| 3 | +teaching: 10 |
| 4 | +exercises: 0 |
| 5 | +--- |
| 6 | + |
| 7 | +:::::::::::::::::::::::::::::::::::::: questions |
| 8 | + |
| 9 | +- FIXME |
| 10 | + |
| 11 | +:::::::::::::::::::::::::::::::::::::::::::::::: |
| 12 | + |
| 13 | +::::::::::::::::::::::::::::::::::::: objectives |
| 14 | + |
| 15 | +- FIXME |
| 16 | + |
| 17 | +:::::::::::::::::::::::::::::::::::::::::::::::: |
| 18 | + |
| 19 | +## Adding an Issue to the Repository |
| 20 | + |
| 21 | +Next thing to do is to add an issue to the repository |
| 22 | +Which will represent something we need to work on |
| 23 | +For the sake of this exercise, it doesn't really matter what the issue is |
| 24 | +But perhaps we've spotted a problem with our codebase during development, and we need to note this problem needs to be fixed |
| 25 | + |
| 26 | +For example, if we look at the README for the repo, we can see there's a broken link |
| 27 | +Clearly a problem, so let's register that as an issue |
| 28 | +Select “Issues”, then “New issue” |
| 29 | +Title: Broken link to article |
| 30 | +Description: The README link to the SSI website article is broken, resulting in a page not found error |
| 31 | +Select “Submit new issue” |
| 32 | +Have opportunity to assign someone to the issue - let's say me |
| 33 | +And also assign what type of issue it is |
| 34 | +It's a problem with the README, so that's probably documentation, so let's set it as that |
| 35 | + |
| 36 | +QUESTION: who’s been able to create a new issue on the repository? Yes/No |
| 37 | + |
| 38 | +## Fixing the Issue |
| 39 | + |
| 40 | +Now the next thing, is perhaps a bit later on, we decide to fix the issue |
| 41 | +So we navigate to the README (go to repository main page) |
| 42 | +And here, for the sake of the exercise, we'll just use GitHub's edit mechanism to edit the file directly |
| 43 | +Alternatively, and in most cases, we'd probably do this by having the repository cloned on our machine, and then we'd make the change, and submit it that way |
| 44 | +But in the interests of time and simplicity, we'll just use GitHub's edit function |
| 45 | +So select the edit icon |
| 46 | +And edit the README to fix the link (remove the bit that says “typo/“) |
| 47 | + |
| 48 | +So we now need to commit the change, so we now select “Commit changes” in the top right |
| 49 | +Good practice when committing a change is to refer to the issue number in the commit message |
| 50 | +This gives us traceability for changes back to the originating issue |
| 51 | +We had our issue number 1, so let's refer to that |
| 52 | +#1 - Fix broken article link |
| 53 | +We could optionally put more info about the fix in the description if we wanted |
| 54 | + |
| 55 | +Now importantly, we want to submit this change as a pull request on a new branch |
| 56 | +This will allow others to review that pull request |
| 57 | +Selecting the second option here allows us to create a new branch for these changes |
| 58 | +And we can give this new branch an identifiable name |
| 59 | +readme-broken-link-fix |
| 60 | + |
| 61 | +Once we select propose changes, this change is submitted and our new branch, with that fix, is created |
| 62 | +And scrolling down, we can see our change highlighted |
| 63 | + |
| 64 | +QUESTION: who’s managed to commit their fix to a new branch? Yes/No |
| 65 | + |
| 66 | +::::::::::::::::::::::::::::::::::::: keypoints |
| 67 | + |
| 68 | +- FIXME |
| 69 | + |
| 70 | +:::::::::::::::::::::::::::::::::::::::::::::::: |
0 commit comments