Skip to content

Commit

Permalink
[chore] Add more labels to the labels action (open-telemetry#36344)
Browse files Browse the repository at this point in the history
#### Description

To further empower code owners this PR adds support for managing more
labels.
  • Loading branch information
TylerHelmuth authored and sbylica-splunk committed Dec 17, 2024
1 parent 8e7913a commit 0025d98
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/scripts/add-labels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ COMMON_LABELS["needs-triage"]="needs triage"
COMMON_LABELS["os:mac"]="os:mac"
COMMON_LABELS["os:windows"]="os:windows"
COMMON_LABELS["waiting-for-author"]="waiting for author"
COMMON_LABELS["waiting-for-code-owners"]="waiting-for-code-owners"
COMMON_LABELS["bug"]="bug"
COMMON_LABELS["priority:p0"]="priority:p0"
COMMON_LABELS["priority:p1"]="priority:p1"
COMMON_LABELS["priority:p2"]="priority:p2"
COMMON_LABELS["priority:p3"]="priority:p3"
COMMON_LABELS["stale"]="Stale"
COMMON_LABELS["never-stale"]="never stale"

LABELS=$(echo "${COMMENT}" | sed -E 's%^/label%%')

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/ping-codeowners-issues.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ if [[ -z "${OWNERS}" ]]; then
exit 0
fi

gh issue comment "${ISSUE}" --body "Pinging code owners for ${COMPONENT}: ${OWNERS}. See [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments) if you do not have permissions to add labels yourself."
gh issue comment "${ISSUE}" --body "Pinging code owners for ${COMPONENT}: ${OWNERS}. See [Adding Labels via Comments](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-labels-via-comments) if you do not have permissions to add labels yourself. For example, comment '/label priority:p2 -needs-triaged' to set the priority and remove the needs-triaged label."
28 changes: 18 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,24 @@ In order to facilitate proper label usage and to empower Code Owners, you are ab
The following general labels are supported:
| Label | Label in Comment |
|----------------------|----------------------|
| `arm64` | `arm64` |
| `good first issue` | `good-first-issue` |
| `help wanted` | `help-wanted` |
| `discussion needed` | `discussion-needed` |
| `needs triage` | `needs-triage` |
| `os:mac` | `os:mac` |
| `os:windows` | `os:windows` |
| `waiting for author` | `waiting-for-author` |
| Label | Label in Comment |
|---------------------------|---------------------------|
| `arm64` | `arm64` |
| `good first issue` | `good-first-issue` |
| `help wanted` | `help-wanted` |
| `discussion needed` | `discussion-needed` |
| `needs triage` | `needs-triage` |
| `os:mac` | `os:mac` |
| `os:windows` | `os:windows` |
| `waiting for author` | `waiting-for-author` |
| `waiting-for-code-owners` | `waiting-for-code-owners` |
| `bug` | `bug` |
| `priority:p0` | `priority:p0` |
| `priority:p1` | `priority:p1` |
| `priority:p2` | `priority:p2` |
| `priority:p3` | `priority:p3` |
| `Stale` | `stale` |
| `never stale` | `never-stale` |
To delete a label, prepend the label with `-`. Note that you must make a new comment to modify labels; you cannot edit an existing comment.
Expand Down

0 comments on commit 0025d98

Please sign in to comment.