From 581186db2a578c46a2b8c3d974a41738760c1c0b Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 10 Jul 2026 11:28:16 -0700 Subject: [PATCH] Guard workflow failure issues in forks --- .github/workflows/workflow-failure-issue.yml | 1 + workflow-failure-issue/README.md | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow-failure-issue.yml b/.github/workflows/workflow-failure-issue.yml index dad3602ef..c15465f28 100644 --- a/.github/workflows/workflow-failure-issue.yml +++ b/.github/workflows/workflow-failure-issue.yml @@ -13,6 +13,7 @@ permissions: {} jobs: workflow-failure-issue: name: Open or close workflow failure issue + if: github.repository_owner == 'open-telemetry' permissions: issues: write # needed to open, comment on, and close workflow failure issues runs-on: ubuntu-latest diff --git a/workflow-failure-issue/README.md b/workflow-failure-issue/README.md index 31ce4675b..ba6232347 100644 --- a/workflow-failure-issue/README.md +++ b/workflow-failure-issue/README.md @@ -2,7 +2,9 @@ Reusable GitHub Actions workflow that tracks the pass/fail state of another workflow (typically a scheduled one) by opening, commenting on, and closing a -GitHub issue in the calling repository. +GitHub issue in the calling repository. The workflow runs only when the calling +repository belongs to the `open-telemetry` organization, preventing runs in +forks from creating failure issues. This is useful because GitHub notifies only a single user of scheduled-workflow failures. Per the [GitHub docs on scheduled workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#actor-for-scheduled-workflows):