1.4: GitHub Issues - Git and GitHub for Poets

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
- Part four of this Git slash GitHub for Poets tutorial. I'm going to talk about GitHub issues, how to file an issue and then, also how to refer to that particular issue as you are working on particular commits. Now, what are GitHub issues for? Now this is one of the few things that I'm showing you that's actually not necessarily a Git concept. This is purely something that exists as a layer on the GitHub website. So one, at some point when you take your repository and put it locally onto your laptop, which I'll show you I think in the next video, those issues won't come. The issues just are for the purpose of collaborating through the GitHub website itself. But they do play a vital role and I find them incredibly useful in managing complex software collaborative GitHub project thingymabobs. Okay, so any repository. Here I have the Rainbow Poem repository, you never know when a pull request is going to come in while I'm making this video by the way, I did refresh it. Hope I see a pull request. No, okay whatever. There's one but that's an old one. Ah, I'm off the track here. Okay, so let's look here. There is a button here, a link here, up here, called Issues. Issues is a place to leave a comment about a project. You know this can be a variety of things. It can be I found a bug, when I pressed this button on this app the whole thing crashes or it can be I noticed that this word was misspelled or this... It can also, you can Issues to add feature requests or ask questions. In general, an issue, GitHub issues are not really meant for the types of things you might find on a programing help forum. They're more specific questions and issues and bugs and feature topic discussions around a particular project. That said, all projects in GitHub repositories probably treat and use Issues in different ways. You can use labels. You can organize them. So many possibilities. What I will say to you is that in particular if you're watching these videos and you're interested in Processing or p5.js some of this can feel very scary and intimidating, like I'm going to file. I found what I think is a bug, but I'm going to file an issue. I'm going to write something and everyone's going to come in and yell at me and tell me I did it wrong. And I will say to you that this is not the way the world should work or GitHub or Git should work or, in particular, please if you're not sure file the issue anyway in Processing or p5.js projects. Write at Shiffman in your description to say that I said you should. Don't worry, there's no way you can do it wrong. The point of the community is to be open and welcoming and to help everybody figure out how to do all this stuff. Nobody really knows how to do it anyway. The people who say that they do probably don't really. I definitely don't. So anyway, please I'm also just making this video to encourage you to file GitHub issues and participate in the open source community. Now, let's say I go over here and click on Issues. There aren't any issues because there aren't any, but I'm going to write a new issue. So I click here and write a new issue. Issues should get a title like Today is Earth Day. Today is Earth Day and I think the poem should reflect that. Now, another thing you could do which is really useful, this a little bit of an aside, but let's say you're trying to reference something that's visual. You can quickly take a screenshot of something. I just took a screenshot and I can actually just, right down here that screenshot should be right here on the desktop. You can see that image file. I can drag that screenshot right into here and it's going to upload it to the issue. I can go here under Preview and I can see this is what my issue looks like now. It has an image in it and also, the other thing that I should point out, is this entire issue thread you can use something called Markdown which is a special kind of markup for writing things. For example, this is a link. So this is the syntax for having a link to something you can see and this is bold, I think, or maybe that's italic. That's bold. So there's a lot of markup that you can learn and if you want to learn about that you can... Somewhere on here, there's a styling Markdown with Markdown is supported and if I click on that it's taking me to a whole page which gives me all the stuff about Markdown. But that's a little bit of an aside. So you can see now, I am writing my issue and I'm going to now click Submit Now. I could add labels. Like I could say it's a bug, a help wanted. You know there's a sort of standard labels. I can create my own labels. I could add it to a milestone. I could assign it to somebody saying like this is a thing you should work on. I'm going to assign it to myself, RainbowCoder and then I'm going to now Submit this issue. And you can see now the issue is submitted and if I click back on Issues, here is a list of all the issues. Now, notice a very important thing here. I have one open issue and zero closed issue. An issue is open until it is resolved. When it is resolved it is closed. Only the person who submitted the issue or the owner of the repository can close an issue. So you should know by the way, that what I'm doing even though I'm the owner of this repository and I'm submitting the issue to this repository... I never, I have a timer going to figure out how long these videos are and I never hit start on the timer. (laughs) I'll hit start now. I've probably been talking for about five minutes. But, so as I was saying a second ago, that I am the owner of this repository and I'm submitting issues but you as somebody else could come, you could submit issues to any repository. Now, let's say I want to resolve this issue. So pretending it wasn't me that submitted it or it doesn't matter even if it was me that submitted it, I now want to make a change in my poem to acknowledge this particular issue and I want to refer back to that issue. So let's do that. I'm going to go to... I'm actually going to just open a new tab so I can come back to that tab. And I'm going to go here, I'm going to go back to the poem and I'm going to click Edit. And I'm going to zoom in here and I'm going to write at the top Today is Earth Day. That probably has capitals, Earth Day, it's like a holiday, special thing. So I'm going to write today is Earth Day and I'm going to say adding Earth Day as per... Now, how do I refer to a particular issue? All issues have an ID number and I'm going to go back to this tab and see what is this issue's ID number. It's actually number 10, which is surprising to me. I would have thought it would have started with number one, but that's fine and we could be sure about that by if I click on that link you can see up here in the URL it's issues slash 10 that's important, too. So I can actually just say in my change as per number 10. So I am now making a commit relevant to that particular issue. I'm going to now click Commit and if I go back to this Issue page and hit Refresh, (laughs) you can see here the camera's about to go off. It took a second for it to appear. You can see that this page now automatically has a little entry that said that RainbowCoder added a commit that referenced this issue just now. This is very useful because if some day later I want to revisit this discussion about this particular issue, I could now click directly on this and I could see, oh, this was the change and I can look directly at that particular change associated with that issue. Now, if I felt that that was done, I could click this Close issue and the issue would be closed. It would go into the Closed category; however, I could do something else. There are certain keywords that will automatically close an issue with a particular commit. So, for example, I go back to the poem and I hit Edit again. Today is Earth Day, I love Earth Day as the second line of the poem. I'm adding I love Earth Day. I could say this fixes number 10, adding that I love Earth Day. So now if I use the word fixes inside my particular commit message, it's going to recognize that... Whoa, I don't want to close this off the broadcast. It's going to recognize that as a commit that fixes... Oh, I messed up the camera a little bit. It's fine, everything's okay. (laughs) It's going to recognize that, sorry. It's going to recognize that as a commit, that resolves that issue and closes it automatically. So let's see if that happens. I'm going to say Commit and now, if I go back to this particular issue and hit Refresh, look it's already closed. So you can see RainbowCoder closed this in 45355f5. What's that? Remember, oops, every single... (laughs) Here I am. Every single commit on the tree of your Git repository changes thingamabob. This light is casting a terrible shadow. It's not supposed to do that. Every single commit has a particular unique identifier known as a hash code with it and that's what you're seeing here. So incidentally, you can also reference... You can also reference commits in an issue, so sorry. So, I'm going to go back. I know this is a little bit of a frantic video. I'm going to try to think more about rainbows and the earth a be a little more calm. But, I'm going to go to my history here and I'm going to see... First of all we can see, look at all these people contributing to this repository. Please file your pull requests. And I'm going to go and I'm going to look this particular issue of this particular commit. I'm going to click on it and I'm going to, what I'm going to do is I'm going to grab in the URL this full hash code and I'm going to do Command C. So I now have copied that and I am going to create an issue that says, I'm not so sure about this change. I propose that we consider doing something slightly different, though I do love the thinking. I don't know, right? And then if I paste that value in here, see how I paste that hash code into the text of this particular issue and then I hit Submit. You can see how that resolves itself automatically to a link that goes directly to that particular change, Today is Earth Day. So there's lots of things you can do on GitHub by referencing issue numbers and referencing commit hash codes to in your commit messages or in your issue descriptions. So, here's what I would like you to do. I would like you to do a couple of things. If you're watching this video, one, file an issue on my Rainbow Poem repository. Say something about what you think the poem should have. Then, I would suggest that you make a pull request that references that issue that resolves it. See if you can do that. I'm going to accept all of your issues and pull requests, then close them all and it'll be exciting to see how that works for you. And once you've done that, you're well on your way to contributing to other open source GitHub repositories. Okay, great. So this wraps up this part four. I think it was part four about Git and GitHub. Thanks very much for watching.
Info
Channel: The Coding Train
Views: 144,550
Rating: 4.9287834 out of 5
Keywords: git, github, Git, GitHub, GitHub Tutorial, Git Tutorial, GitHub Issues, Solving Issues, Issues, repository, branch, pull request, version control, version control tutorial, code backup, team programming, teamwork, teamwork coding
Id: WMykv2ZMyEQ
Channel Id: undefined
Length: 11min 31sec (691 seconds)
Published: Sun Apr 24 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.