You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 24, 2025. It is now read-only.
flowchart LR
A["CI Workflow"] --> B["Check PR Title Format"]
B --> C["Extract Expected Entry"]
C --> D["Check First Line of CHANGELOG.md"]
D --> E["Validate Entry Matches"]
Loading
File Walkthrough
Relevant files
Enhancement
wf_check_changelog.yaml
Replace diff-based with first-line changelog validation
.github/workflows/wf_check_changelog.yaml
Remove git diff-based changelog checking logic
Replace with direct first-line validation of CHANGELOG.md
Update error messages to reflect new validation approach
Simplify validation by checking exact match of first line
Latest suggestions up to 886ff0b
Explore these optional code suggestions:
Category
Suggestion
Impact
General
Use robust string comparison method
The string comparison using = is fragile and may fail due to whitespace differences or special characters in the PR title. Use a more robust comparison method that handles potential formatting issues.
-if [ "$FIRST_LINE" = "$EXPECTED_ENTRY" ]; then+if echo "$FIRST_LINE" | grep -Fxq "$EXPECTED_ENTRY"; then
echo "PR title with PR number found as first line in ${{ inputs.PROJECT_PATH}}/CHANGELOG.md"
else
echo "::error::Expected entry '$EXPECTED_ENTRY' not found as the first line in ${{ inputs.PROJECT_PATH }}/CHANGELOG.md"
echo "::error::Please add your PR title with PR number as the first line in CHANGELOG.md (Example: 'feat (myservice): something something #$PR_NUMBER')"
exit 1
fi
Suggestion importance[1-10]: 5
__
Why: The suggestion improves robustness by using grep -Fxq instead of direct string comparison, which could handle edge cases better. However, the current = comparison is standard and appropriate for exact string matching in shell scripts.
The current check only verifies if CHANGELOG.md was modified but doesn't validate the content format. This could allow PRs with incomplete or incorrectly formatted changelog entries to pass validation.
-if git diff --name-only origin/${{ github.base_ref || 'main' }} | grep -q "${{ inputs.PROJECT_PATH }}/CHANGELOG.md"; then+# Get the diff for CHANGELOG.md+git diff origin/${{ github.base_ref || 'main' }} -- ${{ inputs.PROJECT_PATH }}/CHANGELOG.md > changelog_diff.txt+if [ -s changelog_diff.txt ]; then+ # Extract PR number+ PR_NUMBER="${{ github.event.pull_request.number }}"++ # Create the expected CHANGELOG entry format with PR title and number+ EXPECTED_ENTRY="$PR_TITLE #$PR_NUMBER"++ # Check if PR title with PR number appears in the diff+ if grep -q "$EXPECTED_ENTRY" changelog_diff.txt; then+ echo "PR title with PR number found in ${{ inputs.PROJECT_PATH}}/CHANGELOG.md diff"+ else+ echo "::error::Expected entry '$EXPECTED_ENTRY' not found in ${{ inputs.PROJECT_PATH }}/CHANGELOG.md diff"+ echo "::error::Please add your PR title with PR number to CHANGELOG.md (Example: 'feat (myservice): something something #$PR_NUMBER')"+ exit 1+ fi+
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies that the new implementation only checks if CHANGELOG.md was modified but doesn't validate the content format, which is a significant regression from the original validation logic that was removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Other
Description
Improve changelog validation in CI workflow
Change from diff-based to first-line checking
Add test files for validation testing
Update error messages for clarity
Diagram Walkthrough
File Walkthrough
wf_check_changelog.yaml
Replace diff-based with first-line changelog validation.github/workflows/wf_check_changelog.yaml
CHANGELOG.md
Add test entry for validationpackages/nhost-js/CHANGELOG.md
README.md
Add temporary test contentpackages/nhost-js/README.md