diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index 55a9b7f2e4..0cfb3babaa 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -18,10 +18,13 @@ jobs: // Titel moet beginnen met mijn-xxxx-chore/feature/bug! todo mijn- patroon moet weggehaald worden wanneer de workflows van mijn-7620 gemerged zijn const jiraPattern = /^MIJN-\d+-(CHORE|FEATURE|BUG)/i const dependabotPattern = /^Build\(deps(-dev)?\): bump/ + const disallowedQuotesPattern = /"/ - if (!(jiraPattern.test(prTitle) || dependabotPattern.test(prTitle))) { + if (disallowedQuotesPattern.test(prTitle)) { + console.log('The PR title contains double quotes, which are not allowed!') + core.setFailed('PR title not valid. Please remove double quotes from the title.') + } else if (!(jiraPattern.test(prTitle) || dependabotPattern.test(prTitle))) { console.log('The PR title does not match JIRA ticket format!') - // Fails the workflow core.setFailed('PR title not valid. Please make sure this PR uses the JIRA ticket or dependabot format.') } else { console.log('PR title format is correct.') diff --git a/.github/workflows/release-notification.yml b/.github/workflows/release-notification.yml index e115633916..da7978c9bd 100644 --- a/.github/workflows/release-notification.yml +++ b/.github/workflows/release-notification.yml @@ -59,22 +59,19 @@ jobs: grep -iE 'BUG:|MIJN-[0-9]+-BUG' release_notes.txt > bugs.txt || true grep -iE 'MIJN-[0-9]+($|[^-])' release_notes.txt > mijn.txt || true - echo "chores<> $GITHUB_OUTPUT - cat chores.txt >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - echo "features<> $GITHUB_OUTPUT - cat features.txt >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - echo "bugs<> $GITHUB_OUTPUT - cat bugs.txt >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - echo "mijn<> $GITHUB_OUTPUT - cat mijn.txt >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - shell: bash + - name: Output Categorized Notes + run: | + append_to_github_output() { + if [ -s "$1.txt" ]; then + echo "$1<> "$GITHUB_OUTPUT" + cat "$1.txt" >> "$GITHUB_OUTPUT" + echo "EOF" >> "$GITHUB_OUTPUT" + fi + } + append_to_github_output 'chores' + append_to_github_output 'features' + append_to_github_output 'bugs' + append_to_github_output 'mijn' - name: Create Customized Release Notes id: custom_release_notes