Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ping-codeowners-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.issue.number }}
COMPONENT: ${{ github.event.label.name }}
SENDER: ${{ github.event.sender.login }}
9 changes: 2 additions & 7 deletions .github/workflows/scripts/ping-codeowners-issues.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

set -euo pipefail

if [[ -z "${COMPONENT:-}" || -z "${ISSUE:-}" || -z "${SENDER:-}" ]]; then
echo "At least one of COMPONENT, ISSUE, or SENDER has not been set, please ensure each is set."
if [[ -z "${COMPONENT:-}" || -z "${ISSUE:-}" ]]; then
echo "Either COMPONENT or ISSUE has not been set, please ensure both are set."
exit 0
fi

Expand All @@ -20,9 +20,4 @@ if [[ -z "${OWNERS}" ]]; then
exit 0
fi

if [[ "${OWNERS}" =~ "${SENDER}" ]]; then
echo "Label applied by code owner ${SENDER}"
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."