add blog about New Features related to labels and projects

This commit is contained in:
HesterG 2023-04-14 10:50:33 +08:00
parent c4165dc4ae
commit ef5fcdfef5
14 changed files with 165 additions and 0 deletions

View file

@ -0,0 +1,165 @@
---
date: "2023-04-13T13:00:00+08:00"
author: "HesterG"
title: "New Features in Gitea 1.19.0 for Managing Issues and Pull Requests"
tags: ["label", "project"]
draft: false
---
Gitea 1.19.0 has introduced new features that make it easier to manage and categorize issues and pull requests across different repositories.
This article explores these three new features: Organization/User Level Projects, Scoped Labels, and Advanced Label Templates.
<!--more-->
# Organization/User Level Projects
Organization/user level projects allow you to manage issues and pull requests across **different repositories** under the **same organization/user**.
This means that you can track the progress of all the issues and pull requests for a particular user or organization in one place.
## How to Create Organization/User Level Projects
Take creating an organization level project as an example:
1. Go to your organization page, click on the "Projects" tab, and then click the "New Project" button.
![new project](/demos/projects-labels/new-project.png)
2. Fill in the project details, including the title, description, template, and card preview.
> Tip: "Basic Kanban" is a great template to use for project management and progress tracking, and "Images and Text" will show images in card preview, which is nice when there is an image attached.
![basic kanban](/demos/projects-labels/create-project.png)
## Set Issues/Pull Requests to the Project
1. On the sidebar of an issue/a pull request, click on "Projects".
2. Select the project to be set.
![set project](/demos/projects-labels/set-project.png)
# Scoped Labels
Scoped labels are labels that contain "/" in their names and are set as **mutually exclusive**.
They are useful for **categorizing** issues and pull requests and **filtering them by labels** easily.
For example, you might use scoped labels to categorize issues and pull requests based on their priority, such as "priority/high" or "priority/low."
You can also use scoped labels to categorize issues and pull requests based on the team responsible for them, such as "team/front-end" or "team/back-end."
This makes it easy to filter and search for issues and pull requests based on their categories.
## How to Create Scoped Labels
1. Inside a repo's Issues/Pull Requests page, click on the "Labels" tab. Click on the "New Label" button.
![new label](/demos/projects-labels/new-label.png)
2. Enter the label name using the format "**scope/label**", and **check the "Exclusive" box** to indicate that the label is mutually exclusive with other "scope/" labels.
![create label](/demos/projects-labels/create-label.png)
## Differences Between Non-Exclusive Labels and Scoped (Exclusive) Labels
Scoped labels are different from non-exclusive labels in terms of their **appearance** and **usage**.
1. Appearance: The scoped labels have two colors as a background discriminating their scopes from names, while non-exclusive labels have a single-colored background.
![scoped label](/demos/projects-labels/scoped-labels.png)
2. Usage: Only one label under the same scope can be added, while non-exclusive labels have no such limitations.
In the example below, labels started with "Priority", "Reviewed" and "Status" have scopes, and only one of the labels can be selected under each scope. Labels started with "Kind" are non-exclusive, and multiple of them can be selected.
![add labels demo](/demos/projects-labels/labels-demo.gif)
> Tip: After adding scoped labels, use them as categories to make it easier to search for issues/pull requests based on the categories/scopes.
![filter labels demo](/demos/projects-labels/labels-filter.gif)
# Advanced Label Templates
Advanced Label Templates are YAML files that follow the [YAML label format](https://github.com/go-gitea/gitea/blob/main/options/label/Advanced.yaml) and allow you to add **customized sets of labels** to your Gitea instance. These labels **can be configured globally**, giving you greater control over how your repositories are organized.
## How to Create and Use Advanced Label Templates
1. Create a new YAML file under `$GITEA_CUSTOM/options/label` directory with a name that identifies the set of labels you want to create. For example, if you want to create a set of documentation related labels, name the file `documentation.yaml`.
2. Define the set of labels using the following format:
```yaml
labels:
- name: "foo/bar" # name of the label that will appear in the dropdown
exclusive: true # whether to use the exclusive namespace for scoped labels. scoped delimiter is /
color: aabbcc # hex colour coding
description: Some label # long description of label intent
```
> For example, in `$GITEA_CUSTOM/options/label/documentation.yaml`, add these labels:
> ```yaml
> labels:
> - name: "Guide/User"
> color: 546e7a
> description: User guides or user manuals.
> - name: "Guide/Contributor"
> color: 795548
> description: Contributor guides or documentation.
> - name: "Guide/Best-Practice"
> color: 4caf50
> description: Documentation on best practices or recommended workflows.
> - name: "Docs/Bug"
> exclusive: true
> color: ee0701
> description: An error or issue in the documentation.
> - name: "Docs/Enhancement"
> exclusive: true
> color: 37474f
> description: A feature request or improvement to the documentation.
> - name: "Docs/Formatting"
> exclusive: true
> color: 795548
> description: Documentation related to formatting or styling.
> - name: "Docs/Api"
> exclusive: true
> color: 880e4f
> description: Documentation of an API or code library.
> - name: "Docs/Translation"
> exclusive: true
> color: 546e7a
> description: Translations or requests for translation of the documentation.
> ```
3. Use the Label Templates
After creating the label template, you can use it when creating label set in for a specific repository or for an organization. The new label templates will be available under the label set dropdown.
For a specific repository:
![select label set](/demos/projects-labels/label-set.png)
For an organization:
![org label set](/demos/projects-labels/org-label-set.png)
4. Use the Labels in Repositories
The newly created labels can now be used in repositories. Simply select the label you want to use from the label dropdown.
![doc labels](/demos/projects-labels/doc-labels.png)
# Efficiently Manage Issues and Pull Requests with Scoped Labels and Organization/User Level Projects
Efficiently managing issues and pull requests across multiple repositories can be a challenging task for organizations and individuals. However, scoped labels and organization/user level projects can provide a more powerful set of tools for managing and prioritizing work.
Scoped labels allow for issues and pull requests to be categorized based on priority, team responsible, or other custom needs. These labels can be added to multiple repositories to ensure consistency across the organization. Label templates can also be utilized to customize label sets and further streamline the workflow.
Organization/user level projects can be created to add and track issues and pull requests across different repositories. For instance, an organization with multiple repositories contributing to a single product can create projects for bug fixes, feature releases, and documentation improvements at the organization level. Labels such as "bugs," "features," and "documentation" can then be scoped and applied to relevant issues and pull requests for better categorization and filtering.
Here is an example of an organization level project list:
![project list](/demos/projects-labels/project-list.png)
Once issues and pull requests have been categorized, they can be easily managed within a project by simply dragging and dropping cards.
This visual representation allows for easy tracking of progress and ensures that everything is moving forward as planned.
![card drag demo](/demos/projects-labels/card-drag.gif)
In conclusion, using scoped labels and organization/user level projects in Gitea can help streamline workflow and centralize the management of work across multiple repositories. This prioritizes and categorizes issues and pull requests more effectively, helping organizations to ensure that their projects are completed in a timely and efficient manner.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB