diff --git a/.github-labels.yml b/.github-labels.yml new file mode 100644 index 0000000..d70ab5f --- /dev/null +++ b/.github-labels.yml @@ -0,0 +1,40 @@ +# Centralized label manifest for all consumer repos. +# Sync via the `sync-labels` reusable workflow. + +# --- PR size labels (pascalgn/size-label-action) --- +- name: "size/XS" + color: "3cbf00" + description: "0 changed lines" + +- name: "size/S" + color: "5d9801" + description: "<10 changed lines" + +- name: "size/M" + color: "7f7203" + description: "<30 changed lines" + +- name: "size/L" + color: "a14c05" + description: "<100 changed lines" + +- name: "size/XL" + color: "c32607" + description: "<500 changed lines" + +- name: "size/XXL" + color: "e50009" + description: "1000+ changed lines" + +# --- Path-based labels (actions/labeler, see labeler.yml) --- +- name: "docs" + color: "0075ca" + description: "Documentation changes" + +- name: "ci" + color: "fbca04" + description: "CI/CD and workflow changes" + +- name: "tests" + color: "c5def5" + description: "Test changes" diff --git a/.github/workflows/pr-size.yml b/.github/workflows/pr-size.yml index 658f13c..ab45eda 100644 --- a/.github/workflows/pr-size.yml +++ b/.github/workflows/pr-size.yml @@ -19,12 +19,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - prefix: "size/" sizes: > { - "XS": 10, - "S": 30, - "M": 100, - "L": 500, - "XL": 1000 + "0": "XS", + "10": "S", + "30": "M", + "100": "L", + "500": "XL", + "1000": "XXL" } diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml new file mode 100644 index 0000000..2378af5 --- /dev/null +++ b/.github/workflows/sync-labels.yml @@ -0,0 +1,36 @@ +name: Sync Labels + +on: + workflow_call: + inputs: + delete-other-labels: + description: "Remove labels not declared in the central manifest." + type: boolean + required: false + default: false + +permissions: + issues: write + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + # + # Pull the central label manifest from anaverage-enri/.github + # + - name: Checkout shared label manifest + uses: actions/checkout@v4 + with: + repository: anaverage-enri/.github + path: .github-config + + # + # Apply labels to the caller repository + # + - name: Sync labels + uses: EndBug/label-sync@v2 + with: + config-file: .github-config/.github-labels.yml + delete-other-labels: ${{ inputs.delete-other-labels }} diff --git a/workflows/deploy.yml b/workflows/deploy.yml deleted file mode 100644 index e69de29..0000000 diff --git a/workflows/realease.yml b/workflows/realease.yml deleted file mode 100644 index e69de29..0000000