Keeping things in order

Last updated on 2025-08-16 | Edit this page

Overview

Questions

  • How to use issues to keep things in order?

Objectives

  • Opening issues
  • Closing issues with merge requests
  • Defining best practices for contributions

Keeping things in order


Whether it’s a personal project of your own or a shared repository, keeping track of tasks in issues is a good practice.

Issues help inform all contributors about missing features, work in progress, or topics for discussion. They can also be used to report bugs. GitLab lets you select from three different types of issues — Incident, Issue, or Task — but these only differ if you have defined separate templates to guide contributors in providing useful information.

Issues can be assigned to project members closed through merge requests. The closing can be automated by using closes #<issue number> in the commit message. Similarly, related to #<issue number> links a commit to an issue, which helps tracking progress.

Issues can be labeled based on their content, difficulty, urgency, status of work in progress, or other properties. The labels can be defined for each project separately, and a default set of labels can be easily generated from Manage -> Labels. Labels are helpful in search in large projects.

Issues can be viewed in an issue board, and be connected to a milestone. They can be set up Plan -> Issue boards and Plan -> Milestones.

Callout

Remember to update your local main/master branch!!!

Always remember to update your local default branch.

git checkout main
git pull

Do this every time when you start a new development.

Challenge

Exercise 06.1

As the owner of the exercise repository, describe a desired new feature in an issue. Assign it to a developer (that’s your exercise buddy). Let them make the changes suggested in the issue and push it in a branch with a commit message that automatically closes the issue once merged. Review the merge request and merge it if you are satisfied.

Use closes #<issue number> in the commit message to connect the merge request to the issue and to close it once merged.

https://docs.gitlab.com/user/project/issues/

Callout

Issues are useful even in single-contributor repositories

If you’re the only contributor, you’ll just be closing your own issues. Still, tracking them helps you stay organized.

Challenge

Exercise 06.2

Explore setting up and using an Issue board. In addition to the default “Open” and “Closed” lists, add some others, for example “In progress” and “Help needed”.

Follow Plan -> Issue boards.

You will see something like this:

To add lists, you will first have to define the corresponding labels in Plan -> Issues.

Challenge

Exercise 06.3

Make a quick list of the work you have planned for your code. For real, not for the exercise repository we have been working on.

Could you add them as issues to the code repository?

That’s on you and we come back to this at the end of the day!

Key Points
  • Issue tracker in GitLab is a convenient tool for a centralised discussion for code development in a repository.
  • Issues are helpful for tracking the progress and sharing the work.