Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add PR title validation workflow #341

Merged
merged 5 commits into from
Dec 27, 2024
Merged

ci: Add PR title validation workflow #341

merged 5 commits into from
Dec 27, 2024

Conversation

EttyKitty
Copy link
Collaborator

@EttyKitty EttyKitty commented Dec 27, 2024

Description of changes

  • Add a CI workflow to check the pull request title using the thehanimo/pr-title-checker action.

Reasons for changes

  • Just to reduce chances of accidental typos slipping in.

Related links

Summary by Sourcery

CI:

  • Validate pull request titles using the thehanimo/pr-title-checker GitHub Action.

Copy link
Contributor

sourcery-ai bot commented Dec 27, 2024

Reviewer's Guide by Sourcery

This pull request introduces a new CI workflow to enforce PR title formatting. The workflow uses the thehanimo/pr-title-checker GitHub Action to validate PR titles against a predefined configuration.

File-Level Changes

Change Details Files
Add CI workflow to check the pull request title.
  • A new GitHub Actions workflow file .github/workflows/pr-title-checker.yml is added.
  • This workflow is triggered on pull request open and edit events.
  • The workflow uses the thehanimo/pr-title-checker@v1.4.3 action to validate the PR title.
  • The workflow runs on the ubuntu-latest runner.
  • A configuration file .github/pr-title-checker-config.json is added to specify the PR title format.
.github/workflows/pr-title-checker.yml
.github/pr-title-checker-config.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added the PR: Chore This PR does something that does't fit other labels label Dec 27, 2024
@sourcery-ai sourcery-ai bot changed the title ci: @sourcery-ai ci: Add PR title validation workflow Dec 27, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @EttyKitty - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding explicit configuration for the allowed PR title formats in the workflow file to make it more self-documenting. The action supports this via the configuration_path parameter.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟡 Security: 1 issue found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

.github/workflows/pr-title-checker.yml Outdated Show resolved Hide resolved
EttyKitty and others added 3 commits December 28, 2024 02:11
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@EttyKitty
Copy link
Collaborator Author

@sourcery-ai review

@EttyKitty EttyKitty added the PR: CI Continuous Integration changes label Dec 27, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @EttyKitty - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The PR is missing the referenced configuration file .github/pr-title-checker-config.json which is required for this workflow to function. Please add the configuration file with the desired title validation rules.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟡 Security: 1 issue found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

.github/workflows/pr-title-checker.yml Show resolved Hide resolved
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @EttyKitty - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The PR is missing the required .github/pr-title-checker-config.json configuration file that defines the allowed title formats. The workflow will fail without this file.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟡 Security: 1 issue found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

.github/workflows/pr-title-checker.yml Show resolved Hide resolved
@EttyKitty EttyKitty merged commit 463b4ca into main Dec 27, 2024
1 check passed
@EttyKitty EttyKitty deleted the ci/pr-title-checker branch December 27, 2024 23:28
EttyKitty added a commit that referenced this pull request Dec 28, 2024
- Validate pull request titles using the `thehanimo/pr-title-checker` GitHub Action.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Chore This PR does something that does't fit other labels PR: CI Continuous Integration changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant