Skip to content
100 changes: 100 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Configuration for automatic PR labeling based on file changes
# https://github.com/actions/labeler

# Core areas
"area: cli":
- Sources/CLI/**/*
- Sources/ContainerCommands/**/*

"area: build":
- Sources/ContainerBuild/**/*
- Makefile
- Package.swift
- Package.resolved
- Protobuf.Makefile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this area is accidentally a combination of container image builder components, project building components, and project dependencies. A large majority of PRs will likely either modify the makefiles or the Package.* files, so I think we can exclude those files from a label category to avoid extra noise.

We should change this to:
area:builder for code related to image building. That would include
- Sources/ContainerBuild//*
- Sources/NativeBuilder/
/*


"area: client":
- Sources/ContainerClient/**/*

"area: networking":
- Sources/ContainerNetworkService/**/*
- Sources/DNSServer/**/*
- Sources/SocketForwarder/**/*
- config/container-network-vmnet-config.json

"area: services":
- Sources/Services/**/*
- Sources/ContainerAPIService/**/*
- Sources/ContainerImagesService/**/*
- Sources/ContainerSandboxService/**/*

"area: runtime":
- Sources/Helpers/RuntimeLinux/**/*
- config/container-runtime-linux-config.json

"area: plugin":
- Sources/ContainerPlugin/**/*

"area: xpc":
- Sources/ContainerXPC/**/*

"area: logging":
- Sources/ContainerLog/**/*

"area: persistence":
- Sources/ContainerPersistence/**/*

"area: terminal":
- Sources/TerminalProgress/**/*

"area: helpers":
- Sources/Helpers/**/*

# Testing
"testing":
- Tests/**/*
- "**/*Test*.swift"
- "**/*Tests.swift"

# Documentation
"documentation":
- docs/**/*
- "**/*.md"
- scripts/make-docs.sh

# Configuration
"configuration":
- config/**/*
- "**/*.json"
- "**/*.toml"
- signing/**/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need this category


# Scripts and tooling
"tooling":
- scripts/**/*
- licenserc.toml
- Makefile
- Protobuf.Makefile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as my comment above, I think we can remove this category entirely.


# GitHub specific
"github":
- .github/**/*

# Dependencies
"dependencies":
- Package.swift
- Package.resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as my comment above, I think we can remove this category entirely.


# C/C++ code
"c/c++":
- Sources/CVersion/**/*
- "**/*.c"
- "**/*.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious what others think here, but I think this category is possibly too small to be useful. We have very little c code and I don't think anyone would really use this label to find or search for PRs.


# Swift protocol buffers
"protobuf":
- "**/*.proto"
- "**/*.pb.swift"
- "**/*.grpc.swift"
- Protobuf.Makefile

32 changes: 32 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Pull Request Labeler"

on:
pull_request:
types: [opened]

permissions:
contents: read
pull-requests: write

jobs:
label:
name: Label Pull Request
if: github.repository == 'apple/container'
runs-on: ubuntu-latest
outputs:
labels-applied: ${{ steps.labeler.outputs.labels-applied }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Apply labels based on file changes
id: labeler
uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yml
sync-labels: true


Loading