Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Create the Issue

In the repository, you will see a tab called “issues.” Click on this tab and then click the green “New Issue” button in the top right of the screen. From there, select the “Task” option by clicking “Get Started.” Name the issue: “‘Your First and Last Name’ - Credits”. Your description should be something along the lines of: “Giving myself credit for the amazing developing work I will be doing at NER!” Your acceptance criteria should be something along the lines of: “See my name on the credits page.” Your Proposed solution should be something along the lines of: “Add my name and favorite color to the “names” array in the CreditsPage.tsx file”. And you can leave the mocks section empty for now. Congratulations! You’ve just made your first ticket in Finishline!

Create a branch

Once you’ve created your issue, you will now create a branch to complete your issue. In your command line, navigate to your local Finishline project(view environment setup if you’re unsure how to get there). If you enter the command git branch, it will show you the branches available and, highlighted in green, is the current branch you are on. You should be on develop, if not, run the command git checkout -b develop. Then once again make sure you are on the correct branch, and from the develop branch, you will create a new one by running the command git branch #yourissuenumber-yourname-credits. It is very important that you add your issue number to the beginning of your branch everytime you create a new branch. Congratulations again! You’ve created your first branch in Finishline and can now open it in VSCode or your preferred IDE to start coding!

Code

Follow the contributor guide for specific coding practices. For this ticket, find the folder named “src”, navigate into the frontend source and then to the “pages” folder. You are currently viewing all the folders for all the code of all of the pages that you see on the website, take a look around at the code you will be getting familiar with for the rest of the semester! For this particular ticket, find the “credits” folder, and from there I will leave you to find the “names” array, and add your name and favorite color to it! To view your changes, enter “yarn start” to start the website and in a browsers url enter “localhost:3000/credits”. If you get stuck along the way make sure to ask any questions in slack!

Submitting Your Code

Once you’ve completed your ticket and are ready to submit what you have for review, go back into your command line, make sure you are still on the right branch by running git branch, and run the command “git add .” which will save all the changes you’ve made, then run “git commit -m ‘#YourIssueNumber Added my name to credits’” Once you’ve committed your work, you must push it to the remote site by entering “git push”.

Its time to create a Pull Request (PR) so that your code can be reviewed. Go to the repository and select the “Pull Requests” tab. From there, select “New pull request” and make sure that “base” is “develop” and “compare” is the branch you’ve created. Once you’ve selected your branch to compare, select “Create Pull Request.”

For your title you can leave it as the branch name if you’ve properly named it. For the changes, say what you’ve changed! If you struggled at all, let us know in the notes section! We won’t be using the test cases section for this ticket, but if you had written any complex code that needed testing, make sure to show the results here, but for now you can delete this entire section. For screenshots, make sure to take one of the screen when its fill the entire screen, and another one where you make it as small as possible.

On mac, the command to take a screen shot is command+shift+4, on windows its the windows logo key+shift+s. Drag the screen shot into the screen shot section and delete the filler text.

You’ve completed the ticket so theres nothing left todo! You can remove this section as well. Then finally go over the check list and make sure you’ve completed everything.

On the right side of the screen you will see an option to request a reviewer, you can select any of the tech leads or anthony, then make sure to assign yourself under the assignee section. Finally at the bottom of your PR you will see “closes #”, enter your issue number next to the #. You will know you’ve succeeded if on the right side panel under “development”, theres a link to your ticket. Finally, select “Create Pull Request” and now you’ve finished! Wait for somebody to review your code, and if they have any comments make sure to make the changes in your code, and make a new commit with those changes, following the same rules as mentioned before(you do not need to create a new pull request).

Handling Merge Conflicts

With everyone working on the same piece of code, you are almost guaranteed to encounter a merge conflict. Github will tell you if your branch has merge conflicts in your PR just beneath where it shows you whether or not you’ve passed your tests. If you do, in your local Finishline directory, run the command git merge develop, this will bring all the changes from develop into your branch and allow you to resolve your merge conflicts. In VSCode, where you have merge conflicts, you will be presented the option to “accept incoming”, “accept current”, or “accept both”. You will most likely simply want to press “accept both”, and that will hopefully resolve your conflict. You can then commit your changes by following the steps in “Submitting your code”. Check your pull request to make sure the merge conflicts are gone, and then your all set!

  • No labels