I want to make sure that a PR can only be merged if a project is associated with that PR.
I have the following yml code to enforce that, but I don’t know which property of the pull_request
object corresponds to the project itself.
name: Enforce Project on Pull Requests
on:
workflow_call:
pull_request:
types: [opened, reopened, edited, assigned, unassigned, synchronize]
jobs:
enforce-project:
runs-on: ubuntu-latest
steps:
- name: Check for Assignee
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.(something_here) }}
run: |
echo "Error: Pull request must have an assignee."
exit 1
Can someone help me figure out that?
Thank you!