Skip to content

chore: replace PRLint with Carson's pr-title-linter - #10529

Open
paulbalandan wants to merge 1 commit into
codeigniter4:developfrom
paulbalandan:carson-pr-title-linter
Open

chore: replace PRLint with Carson's pr-title-linter#10529
paulbalandan wants to merge 1 commit into
codeigniter4:developfrom
paulbalandan:carson-pr-title-linter

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
This PR starts moving our repository automation onto a single GitHub App, Carson, installed once at the org level and driven from .github/carson.yml. Each existing app or action gets its own PR so the translation can be checked in isolation.

First up is PRLint. Its one rule ports verbatim into Carson's pr-title-linter subscriber: same regex, same message. The result is reported as a check run instead of the PRLintReloaded status. The check is currently named Carson / pr-title via the name setting in .github/carson.yml and can be renamed to anything before merge, for example to match the App name chosen below.

Changes:

  • Add .github/carson.yml enabling pr-title-linter with the existing title rule.
  • Add .github/workflows/carson.yml running Carson on pull_request_target for opened and edited, pinned to v1.3.0. Triggers are limited to what this subscriber needs and will widen as more subscribers come over.
  • Remove .github/prlint.json.

Why Carson:

  • One App, one config file, one workflow for all bot behaviour, instead of separate third-party apps each holding org access.
  • Configuration is read from the default branch only, so a PR cannot alter the bot's behaviour.
  • Carson never checks out or runs PR code, so pull_request_target is safe here.

Before merging, an org admin needs to:

  1. Register the App under the codeigniter4 org via https://nexusphp.github.io/carson/ and install it on this repository. The name is the admin's call. GitHub App names must be unique across GitHub, and the name determines the bot login that appears on comments and check runs. Some options:
    • Carson @ CodeIgniter4 (bot: carson-codeigniter4[bot]), matching the org login
    • Carson @ CodeIgniter (bot: carson-codeigniter[bot]), matching the project name
    • CodeIgniter Butler (bot: codeigniter-butler[bot]), if we prefer not to expose the tool name
    • codeigniter4-bot (bot: codeigniter4-bot[bot]), a plain org-branded bot account
    • codeigniter-bot (bot: codeigniter-bot[bot]), the same without the version number
  2. Add CARSON_APP_ID and CARSON_PRIVATE_KEY as Actions secrets.
  3. Replace PRLintReloaded with the check name from .github/carson.yml in any required status check rule.
  4. Uninstall the PRLint app.

Because the workflow runs from the base branch under pull_request_target, the check will first appear on PRs opened after this merges.

Planned follow-ups, in order: auto-labeler plus conflicts-notifier (replacing actions/labeler and the conflict script), signed-commits, and finally welcome plus template-enforcer for Mergeable.

Test runs can be checked here: https://github.com/paulbalandan/b40d520f57f086f2e58d1f21d093935d/actions

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@github-actions github-actions Bot added the github_actions Pull requests that update Github_actions code label Sep 6, 2026

@michalsn michalsn left a comment

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.

Good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants