-
Notifications
You must be signed in to change notification settings - Fork 236
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
(chore) O3-1109: Added a GitHub Action to check PR titles #1324
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA new GitHub Actions workflow was added to the repository to validate pull request titles. The workflow runs on pull request events—when they are opened, edited, reopened, or synchronized—using an Ubuntu runner. It leverages the Changes
Sequence Diagram(s)sequenceDiagram
participant PR as Pull Request Event
participant Runner as GitHub Actions Runner (Ubuntu)
participant Action as Semantic PR Title Action
PR->>Runner: Trigger on opened, edited, reopened, or synchronized PR
Runner->>Action: Execute title validation check
Action-->>Runner: Return result (valid/invalid)
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/pr-title-check.yml (1)
22-22
: Newline at End of File.
YAMLlint reported a missing newline at the end of the file. Please add a newline character at the end to meet best practices.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 22-22: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/pr-title-check.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/pr-title-check.yml
[error] 22-22: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (6)
.github/workflows/pr-title-check.yml (6)
1-2
: Title & Workflow Name is Clear.
The workflow is clearly named "PR Title Checker," which makes its purpose immediately evident.
3-6
: Event Triggers are Well-Defined.
The workflow is triggered on relevant pull request events (opened
,edited
,reopened
,synchronize
), ensuring that PR title validations occur on all necessary updates.
7-10
: Job Definition is Correct.
The job configuration underjobs
properly specifiesruns-on: ubuntu-latest
, which ensures compatibility with the environment required for running the action.
11-13
: Step to Check PR Title Format is Configured Correctly.
The step uses theamannn/action-semantic-pull-request@v5
action appropriately to validate the PR title against semantic commit conventions.
14-20
: Semantic Commit Types Properly Listed.
The list undertypes
includesdocs
,test
,chore
,fix
,feat
, andBREAKING
, which aligns with conventional commit standards. This ensures PR titles will adhere to expected formats.
21-22
: Environment Variable is Securely Configured.
The use of theGITHUB_TOKEN
from the repository secrets is a secure and standard practice for authenticating GitHub Actions.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 22-22: no new line character at the end of file
(new-line-at-end-of-file)
@brandones I created this fresh PR on the same issue because the previous had branch conflicts on my local repository. Also there were too many commits on the previous one. I thought one commit having all the changes thus far would be better. |
Do not open new PRs for the same work if you can possibly avoid it. I understand getting into messes with git branches. Try to learn to use git better. AI can be useful for learning git and debugging messed up git state. Too many commits is not a problem. They get squashed when a PR is merged anyway. If you have commits locally that you want to squash before you push, you can use an interactive rebase to do that. |
Part of the reason why we don't want PRs closed and replaced with new ones is because we lose the comment and revision history. And you have not fixed the problem I named last time. The check needs to pass with the usual PR title format that the OpenMRS community uses. |
Thank you for the advice @brandones I really appreciate it and the chance to learn. |
The previous PR with the title "(chore) O3-1109: Added a GitHub Action to Check PR titles |
@IamLRBA Do you understand what the problem is and what I am asking you to do? |
Duplicate PR of #1307 (comment)
Requirements
feat
,fix
, orchore
, among others). See existing PR titles for inspiration.For changes to apps
If applicable
Summary
This PR adds a GitHub Actions workflow to enforce PR title conventions using the
amannn/action-semantic-pull-request@v5
action. The workflow checks whether PR titles follow the conventional commit format (feat
,fix
,docs
, orBREAKING
:). This ensures consistency in PR naming, improving clarity in commit history and changelogs.Screenshots
N/A (This is a CI/CD workflow update).
Related Issue
Related Jira issue
Other
This automation will help maintain standardized PR titles across the repository, reducing manual review overhead.
Summary by CodeRabbit