Commit a7c7ed80 authored by Benjamin Cabé's avatar Benjamin Cabé Committed by Anas Nashif
Browse files

ci: workflows: assigner.yml: only fetch west.yml on pull_request events



Fixes issue where assigner workflow now fails on issues due to trying
to access a pull_request attribute that doesn't exist on the event.

Signed-off-by: default avatarBenjamin Cabé <benjamin@zephyrproject.org>
parent d4951a1b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
name: Pull Request Assigner
name: Pull Request/Issue Assigner

on:
  pull_request_target:
@@ -20,7 +20,7 @@ permissions:

jobs:
  assignment:
    name: Pull Request Assignment
    name: Pull Request/Issue Assignment
    if: github.event.pull_request.draft == false
    runs-on: ubuntu-24.04
    permissions:
@@ -39,6 +39,8 @@ jobs:
        python-version: 3.12

    - name: Fetch west.yml from pull request
      if: >
        github.event_name == 'pull_request_target'
      run: |
        git fetch origin pull/${{ github.event.pull_request.number }}/head
        git show FETCH_HEAD:west.yml > pr_west.yml