Skip to content

[DND-2101] Check PR titles with actions/github-script - #5

Open
GuySaar8 wants to merge 1 commit into
masterfrom
GuySaar8/DND-2101-pr-title-github-script
Open

GuySaar8 wants to merge 1 commit into
masterfrom
GuySaar8/DND-2101-pr-title-github-script

Conversation

@GuySaar8

Copy link
Copy Markdown
Contributor

Replaces the third-party deepakputhraya/action-pr-title with a short actions/github-script step. Same regex, same result. Tracked in DND-2101 (no GitHub issue).

Why

The title check runs on every PR. deepakputhraya/action-pr-title is pinned and harmless today (about 80 lines that read the PR and test a regex, with a read-only token), but it's a weak dependency to keep:

  • One maintainer, mostly idle: last commit February 2025, and no releases, so the pin tracks a master commit with no changelog.
  • Retiring runtime: its action.yml declares node20, which GitHub is phasing out.
  • It does almost nothing: a regex check on the title doesn't need its own dependency.

actions/github-script is maintained by GitHub and already pinned and kept up to date by Renovate across the org, so this removes a third-party action without adding a new one.

What changes

  • The step reads the PR through the API (so a re-run sees the current title, as before), tests it against the same regex, and fails with the title and regex in the message.
  • pull-requests: read is added: that API read needs it. The old action made the same call and only worked here because the repo is public.

The title check on this PR is the test: its title has to pass the new step.

🤖 Generated with Claude Code

Replace deepakputhraya/action-pr-title with a short actions/github-script
step: same regex, same API read of the current title. Also grant the
pull-requests: read that the API read needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch is waiting to be deployed

1 waiting deployment
integration — 5deeb599 Waiting Nov 24, 2026 by GuySaar8 via Integration (comet.com) #11
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.

1 participant