Skip to content

feat: add reusable PR description check workflow - #16

Merged
LuWang1983 merged 4 commits into
masterfrom
task/INFR-6089/pr-description-check-workflows
Aug 26, 2026
Merged

feat: add reusable PR description check workflow#16
LuWang1983 merged 4 commits into
masterfrom
task/INFR-6089/pr-description-check-workflows

Conversation

@LuWang1983

@LuWang1983 LuWang1983 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Overview

  • add callable and local PR description check workflows to UseAlloy/.github
  • extract Overview validation into .github/scripts/validate-pr-description.js
  • callable checks out scripts via job.workflow_repository / job.workflow_sha so consumer repos get the pinned script version
  • exempt revert PRs from description validation (detected by Revert ... title or revert-* branch name); handled in-script so required checks still pass instead of showing skipped
  • add PR template comment documenting that the Overview section must be present and filled out (used by CI validation)
  • local workflow runs on opened, edited, and reopened only (not label changes)

Relates to INFR-6089.

🤖 Coding AI Authorship

  • Human-authored: written almost entirely by hand; maybe some autocomplete, sourced code or scaffolding.
  • Co-authored: agent wrote meaningful portions, significantly edited by me.
  • AI-authored: nearly all agent-authored with minimal human edits if any.
    Operator directed, reviewed, and revised; AI implemented the workflow and script changes.

🧪 Test Instructions

  1. Merge this PR
  2. Wire a consumer repo to UseAlloy/.github/.github/workflows/callable.pr-description-check.yaml@<ref> (or enable the local workflow in this repo)
  3. Open a PR with a filled Overview — check should pass
  4. Open a revert PR (title Revert ...) — check should pass without requiring Overview content
  5. Failed run: https://github.com/UseAlloy/.github/actions/runs/32899598921
  6. Successful run: https://github.com/UseAlloy/.github/actions/runs/32902795183

Test Results

Successful run verified on this PR.

📝 Authoring Guidelines

As the author, I verify that I have:

  • Followed the test instructions and updated the test results.
  • Added/updated unit tests as applicable.
  • Added/updated documentation as applicable.

🚨 Risks

Shared callable workflow — consuming repos must reference this repo (not org-workflows) for the PR description check. Missing job.workflow_* fails checkout by design.

Add callable and local workflows plus Overview validation script so repos can enforce the org PR template via UseAlloy/.github.
@Jarvis-Alloy

Copy link
Copy Markdown

Revert PRs skip description validation in-script so required checks still pass.
Add template comment noting the Overview section is validated by CI.
@LuWang1983 LuWang1983 self-assigned this Aug 25, 2026
@LuWang1983
LuWang1983 requested a review from a team August 25, 2026 21:54
Comment thread .github/PULL_REQUEST_TEMPLATE.md Outdated
Comment thread .github/workflows/callable.pr-description-check.yaml Outdated
Comment thread .github/PULL_REQUEST_TEMPLATE.md Outdated
Comment thread .github/workflows/local.pr-description-check.yaml Outdated
Clarify Overview template comment, rely on script default for min length,
and run the local check only on opened, edited, and reopened PR events.
.github/scripts
token: ${{ secrets.GH_TOKEN }}

- name: Validate PR description

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's a new way to reference actions in the same repo without having to checkout the source code. this would mean wrapping the validate-pr-description.js script in a callable action

https://github.blog/changelog/2026-07-30-reference-same-repository-actions-with-self-repository-syntax/

 - name: Call local action
        uses: $/ .github/actions/my-custom-action
        with:
          my-input: 'hello'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave this to the next time if necessary. But TIL, this is good to know!

@LuWang1983
LuWang1983 merged commit bc39ac7 into master Aug 26, 2026
1 check passed
@LuWang1983
LuWang1983 deleted the task/INFR-6089/pr-description-check-workflows branch August 26, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants