diff --git a/.github/workflows/pr-approved-issue.yml b/.github/workflows/pull-request-validation.yml similarity index 89% rename from .github/workflows/pr-approved-issue.yml rename to .github/workflows/pull-request-validation.yml index d06a7f2..a2f1a24 100644 --- a/.github/workflows/pr-approved-issue.yml +++ b/.github/workflows/pull-request-validation.yml @@ -1,4 +1,4 @@ -name: 'PR Approved Issue Check (Reusable)' +name: 'Pull Request Validation (Reusable)' # Every PR from an external contributor is converted to a draft if its # description does not link an approved issue assigned to the PR author. # Repository owners, org members, collaborators and bots bypass this check. @@ -7,10 +7,10 @@ on: workflow_call: inputs: ref: - description: 'Git ref (branch, tag, or commit SHA) of shared-workflows to check out' + description: 'Git ref (branch, tag, or commit SHA) of shared-workflows to check out (defaults to job.workflow_sha)' required: false type: string - default: 'main' + default: '' permissions: contents: write # Needed, with pull-requests: write, to toggle draft state. @@ -29,7 +29,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: 'keras-team/shared-workflows' - ref: '${{ inputs.ref }}' + ref: '${{ inputs.ref || job.workflow_sha }}' persist-credentials: false path: '.shared-workflows' diff --git a/docs/pr_policy.md b/docs/pr_policy.md index aaafff3..20c5426 100644 --- a/docs/pr_policy.md +++ b/docs/pr_policy.md @@ -22,7 +22,7 @@ To keep review bandwidth focused on high-leverage improvements and prevent dupli --- -## Automated Enforcement (`pr-approved-issue`) +## Automated Enforcement (`pull-request-validation`) Our automated workflow checks every pull request from external contributors when a PR is `opened`, `edited`, `reopened`, or marked `ready_for_review`: