Skip to content

Commit

Permalink
fix pr-reviewed for forks
Browse files Browse the repository at this point in the history
  • Loading branch information
mumrah committed Mar 4, 2025
1 parent d518176 commit 3613abb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ There are two files related to this workflow:

* [pr-labeled.yml](pr-labeled.yml) approves a pending approval for PRs that have
been labeled with `ci-approved`
* [ci-requested.yml](ci-requested.yml) approves future workflow requests automatically
* [workflow-requested.yml](workflow-requested.yml) approves future workflow requests automatically
if the PR has the `ci-approved` label

_The pr-labeled.yml workflow includes pull_request_target!_
Expand All @@ -119,6 +119,9 @@ or body edited. This workflow simply captures the PR number into a text file
using the saved text file. This workflow runs the linter script that checks the
structure of the PR

Note that the pr-reviewed.yml workflow uses the `ci-approved` mechanism described
above.

### Stale PRs

This one is straightforward. Using the "actions/stale" GitHub Action, we automatically
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: CI Requested
name: Workflow Requested

on:
workflow_run:
workflows: [CI]
workflows: [CI, Pull Request Reviewed]
types:
- requested

run-name: CI Requested for ${{ github.event.workflow_run.display_title}}
run-name: Workflow Requested for ${{ github.event.workflow_run.display_title}}

jobs:
check-pr-labels:
# Even though job conditionals are difficult to debug, this will reduce the number of unnecessary runs
if: |
github.event_name == 'workflow_run' &&
github.event.workflow_run.event == 'pull_request' &&
(github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'pull_request_review') &&
github.event.workflow_run.status == 'completed' &&
github.event.workflow_run.conclusion == 'action_required'
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3613abb

Please sign in to comment.