Menu

Issue and PR Management

Relevant source files

This document explains the automated systems for managing GitHub Issues and Pull Requests in the Flutter Mobile Project Template. It covers label management, automatic PR labeling, reviewer assignment, and automated issue creation during project initialization. For information about PR checks and validations, see PR Checks Workflow. For details on project initialization, see Project Initialization.

1. Label System Overview

The template implements a comprehensive label system that categorizes issues and pull requests by type and affected package.

Sources: .github/labels.yml .github/labeler.yml .github/workflows/labels.yml .github/workflows/labeler.yml

1.1 Label Definitions

The repository defines two types of labels:

  1. Default GitHub Labels: Standard labels for basic issue categorization (bug, enhancement, documentation, etc.)
  2. Package-specific Labels: Labels that identify which package in the monorepo is affected by a change

The labels are defined in .github/labels.yml and automatically synchronized with the repository using the labels.yml workflow.

Label TypeExamplePurpose
Defaultbug, enhancement, documentationCategorize issue or PR by type
Package-specific@apps/app, @packages/cores/coreIdentify affected package
Initializationinitialization, optionalMark issues created during project setup

Sources: .github/labels.yml1-36 .github/labels.yml38-103

2. Automatic PR Labeling

Pull requests are automatically labeled based on the files changed using the labeler.yml workflow, which runs on the pull_request_target event.

Sources: .github/labeler.yml1-64 .github/workflows/labeler.yml1-18

2.1 Package-specific Labeling Rules

The template automatically applies package-specific labels to pull requests based on the files modified. For example, changes to files in packages/cores/core/ will receive the @packages/cores/core label.

Example labeling rules:

- label: "@apps/catalog"
  files:
    - apps/catalog/.+

- label: "@packages/cores/core"
  files:
    - packages/cores/core/.+

This helps reviewers quickly identify which packages are affected by a change.

Sources: .github/labeler.yml4-64

3. Automatic PR Assignment System

The template includes an automated system for assigning reviewers and assignees to pull requests. This system is implemented in the auto-assign.yaml workflow, which runs when a pull request is opened or moves from draft to ready for review.

Sources: .github/workflows/auto-assign.yaml1-71

3.1 Reviewer Assignment Process

The auto-assign workflow executes the following steps:

  1. Checks if the PR already has reviewers assigned
  2. If no reviewers are assigned:
    • Requests reviewers from the repository variables REVIEWERS and TEAM_REVIEWERS
    • Uses a GitHub App token for authentication
  3. Assigns the PR to the PR creator
  4. Adds a comment "Ready for review 🚀" to notify reviewers

This automated process ensures that PRs are properly assigned and reviewed.

Sources: .github/workflows/auto-assign.yaml11-56 .github/workflows/auto-assign.yaml57-71

4. Automated Issue Creation on Initialization

When a new repository is created from this template, the initialization workflow automatically creates several issues to guide initial project setup.


Sources: .github/workflows/initialization.yaml1-94 .github/actions/create-issue-at-initialization/action.yaml1-45

4.1 Initial Issues

The following issues are automatically created during initialization:

  1. Pull Request reviewer automatic assignment setup
  2. App icon configuration
  3. Application ID renaming
  4. Splash screen setup (optional)
  5. Pull Request deployment workflow setup (optional)

Each issue includes detailed instructions for completing the setup task, with optional issues marked with the optional label.

Sources: .github/actions/create-issue-at-initialization/action.yaml7-45

5. Integration with Project Lifecycle

The issue and PR management system integrates with other aspects of the project lifecycle to provide a smooth development experience.

Sources: .github/workflows/initialization.yaml1-94 .github/workflows/auto-assign.yaml1-71 .github/workflows/labeler.yml1-18

The automation system creates a streamlined workflow from project initialization through the entire development lifecycle, ensuring consistent labeling, reviewer assignment, and issue tracking.

Syntax error in textmermaid version 11.6.0