Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][CI/CD] Ping code owners even if one applies the label #30136

Merged
merged 1 commit into from
Dec 27, 2023
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."