AIDA is a robot worked on by a group of students in the course TDDD96. The project is requested by IDA and is currently worked on by eight people simultaneously, which in turn, is why this repo exists! The repo is used to assist in the creation of code as well as keeping track of our kanban board and other iterative processes. In this README there is a guide for use on how to use the repo, as well as some useful links.
TODO: What is used for the repo, do I need to install anything?
This is a guide on how to use this git repo, both for code development and for the iterative development, to maintain consistency and to make our work easier.
First and foremost, all development is supposed to happen on different branches, in fact, it is impossible to push to the main branch. Trying to push to main will result in:
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: Changes must be made through a pull request.
To https://github.com/eliasjlara/PUM-04.git
! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to 'https://github.com/eliasjlara/PUM-04.git'This is a safety precaution to keep bugs and non-approved code from the most important branch, the main one! To start coding on a ticket, you can follow these steps as a guide:
- Check that you're on the main branch using
git branch, if you're not, dogit checkout main. - Pull the latest changes from main using
git pull. - Create a branch with a name relating to the ticket name using
git checkout -b <good-name>. - Implement your changes on this branch.
- When ready, push your changes following standard procedure:
git statusgit add <changed files you want to push>git commit -m "Make sure to have a good message describing change"git push
- If this is the first push to the branch you will get something like:
remote:
remote: Create a pull request for 'test-pr-template' on GitHub by visiting:
remote: https://github.com/eliasjlara/PUM-04/pull/new/test-pr-template
remote:
To https://github.com/eliasjlara/PUM-04.gitNavigate over to the link in the message, or if this isn't the first time you push to the branch, you can find the pull request in the the Pull requests tab on the repo github page. After this, you are now ready to create a pull request!
- When clicking the link you should be greeted by a page that looks something like this:
Choose a good title, preferably the name of the ticket and update the description according to the template I have created, you may remove the comments. When ready, press the green Create pull requestbutton! - You should now be directed to a page that looks like this:
Congratulations, you have now created a PR! This is where all updates added to the branch will be shown. If you continue working on the branch, for example if you forgot a bug, each commit will be shown on the timeline, creating a simple way to keep track of everything that has happened. Also, notice the big red crosses, don't be alarmed, we will take care of this in the next step. - Before we can merge this pull request we first need someone else to look at it, this is the safety precaution previously mentioned. To request a review from someone you either click on the cogwheel that belongs to the reviewers tab on the to right of the page, and choose a specific person to review the PR. The easiest way however would probably just be to send the link in discord and ask for a review.
- Once the PR is reviewed and approved, you can now go ahead and merge the PR into main!
- After merging you might be given an option to delete the branch, I would recommend that you do it to keep branches clean but this is up to you.
Wow, your code feature is now real since it's implemented on main 🥳🎉. This should be it for someone who is developing, if someone asked you to review a PR, check out the "Approve a pull request" section.
I choose to keep our Iterative development and code development contained in the same place, therefore, we have our different boards here on GitHub. To access the boards, head over to the Projects tab in the repo, there we have two links, Kanban and ToDo. This is where we keep all our tickets et cetera.
TODO: Write the rest about our iterative development
So, someone has asked you to review a pull request... well, don't worry. Here is a guide on how to do it step by step.
- First off, reviewing a pr isn't anything special, you simply want to check that all the code that the author wants to merge into main looks good. The simplest way to check is using the
Files changedtab on the pr page. When actually checking the code, there is no specific way to do this so go ahead and do it in what ever way is best for you, BUT, be thorough, we don't want any errors in main just because you approved the pull request without looking! - If there are any comments you want to add:
- The simplest way to add a comment is to click the line where you have a comment and then simply write the comment and post it.
- After the author of the pull request has changed or answered your comments, and it now looks good to you, press the
resolve conversationbutton to "remove" the comment.
- When the pr looks good. Head over to the
Files changedtab again and press theReview changesbutton, selectApproveand then submit the review. - The pr should now be reviewed and the author can merge it into main.