Skip to content

Commit

Permalink
chore(ci): add labels sync workflow (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcaron authored Jan 8, 2025
1 parent b609ee9 commit c03c8b1
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Resolves: #NA
<!-- Yes or No -->
<!-- If this does introduce a breaking change, please describe the impact and migration path for existing applications below. -->
<!-- If you modify database schema, ensure you:
1. Add the 'bump_db' label to the PR
1. Add the 'db-migration label to the PR
2. Document the schema changes
3. Provide migration instructions if needed
-->
Expand Down
93 changes: 93 additions & 0 deletions .github/config/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
# Issue Types - Core labels for issue categorization
- name: bug
color: d73a4a
description: Report an issue or unexpected behavior
- name: feature
color: a2eeef
description: Request for new feature or enhancement
aliases: [enhancement]
- name: question
color: d876e3
description: Request for information or clarification

# Development Status - Progress tracking
- name: research
color: 0890c3
description: Research and exploration required before implementation
aliases: [exploration]
- name: wont-fix
color: ffffff
description: This will not be worked on or fixed
aliases: [wontfix]
- name: stale
color: ededed
description: No activity for a long period

# Quality & Testing - Code quality related labels
- name: code-quality
color: c5def5
description: Improvements to code structure and quality
aliases: [code quality]
- name: testing
color: 1d76db
description: Related to tests and test infrastructure
aliases: [tests]
- name: docs
color: 0075ca
description: Documentation changes or improvements
aliases: [documentation]
- name: performance
color: fef2c0
description: Performance improvements or optimizations
aliases:
- perf

# Component Specific - Labels for specific components
- name: node
color: 2cbe4e
description: Related to the full node implementation
aliases: [full node]
- name: sequencer
color: d93f0b
description: Related to the sequencing logic and implementation
- name: infrastructure
color: c2e0c6
description: CI/CD, deployment and infrastructure changes
aliases:
- infra

# Version & Features Tracking - Version and feature specific labels
- name: v0.13.2
color: b104c2
description: Related to version 0.13.2
aliases: [0.13.2]
- name: db-migration
color: ee0701
description: Requires database schema changes or migration
aliases: [bump_db]
- name: rpc-v0.8.0
color: 53112f
description: Implementation of RPC specification v0.8.0
aliases:
- rpc-0.8.0

# Issue Management - Issue workflow labels
- name: help-wanted
color: 008672
description: Looking for contributors to help with this
aliases: [help wanted]
- name: duplicate
color: cfd3d7
description: Similar issue or PR already exists
- name: invalid
color: e4e669
description: This issue or PR is not applicable
# ----------------------------------------
# Color Scheme Reference:
# - Reds (d73a4a, ee0701) for critical/blocking issues
# - Blues (0075ca, 1d76db) for technical tasks
# - Greens (2cbe4e, c2e0c6) for components
# - Purples (b104c2, d876e3) for versions/questions
# - Yellows (e4e669, fef2c0) for warnings/performance
# - Grays (ededed, ffffff) for workflow status
87 changes: 0 additions & 87 deletions .github/labels.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/db-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
update-db-version:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'bump_db')
if: contains(github.event.pull_request.labels.*.name, 'db-migration')
steps:
- uses: actions/checkout@v3

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Sync labels
on:
push:
branches:
- main
paths:
- ".github/labels.yml"
workflow_dispatch:

permissions:
issues: write

jobs:
labels:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: .github/config/labels.yml

- uses: EndBug/label-sync@v2
with:
config-file: .github/config/labels.yml
delete-other-labels: true
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion scripts/update-db-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Database version management script
#
# This script updates the database version tracking file when schema changes occur.
# It's typically called by CI when a PR with the 'bump_db' label is merged.
# It's typically called by CI when a PR with the 'db-migration' label is merged.
#
# Requirements: yq (https://github.com/mikefarah/yq/)
#
Expand Down

0 comments on commit c03c8b1

Please sign in to comment.