[CI] Adding release notes for non-rc versions & PR validations workflows#289
[CI] Adding release notes for non-rc versions & PR validations workflows#289GiladShapira94 wants to merge 16 commits intomlrun:developmentfrom
Conversation
| const title = context.payload.pull_request.title; | ||
| const prNumber = context.payload.pull_request.number; | ||
|
|
||
| const allowedScopes = ['feature', 'fix', 'docs', 'improvement', 'revert', 'breaking', 'ci']; |
There was a problem hiding this comment.
The allowed scopes (feature, fix, docs, improvement, revert, breaking, ci) don't align with cliff.toml's commit parsers (feat, fix, perf, refactor, docs, chore, revert, breaking).
feature passes validation but won't match [feat] in cliff
improvement and ci pass validation but have no cliff parser at all
perf, refactor, chore are recognized by cliff but would fail validation
From what I understand, these two systems need to share the same vocabulary or the release notes categorization will be broken for newly enforced titles.
| if (!match) { | ||
| core.setFailed( | ||
| `PR title must follow the format: [scope] description\n` + | ||
| `Example: [Feat] Add SeaweedFS bucket auto-creation\n` + |
There was a problem hiding this comment.
The example [Feat] Add SeaweedFS bucket auto-creation would fail this very validation. Feat lowercased is feat, which is not in allowedScopes (the list has feature, not feat). Either change the example to [Feature] ... or change the scope name to feat.
| | grep "^mlrun-ce-${VERSION}-rc." \ | ||
| | head -1) | ||
| echo "tag=${FIRST_RC}" >> $GITHUB_OUTPUT | ||
| echo "First RC tag: ${FIRST_RC}" |
There was a problem hiding this comment.
Not sure if can happen, but If no RC tag exists for this version (e.g., a hotfix release that skipped RC), FIRST_RC will be empty. The downstream git-cliff step would then receive ^..HEAD as the range, which is invalid and will fail the workflow. you can add a guard if you think necessary.
| - name: Update GitHub Release with release notes | ||
| if: steps.version_check.outputs.is_rc == 'false' | ||
| env: | ||
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
There was a problem hiding this comment.
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
There was a problem hiding this comment.
I just use the same ENV the job has been using already - link if i change this should I change the old one also?
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, edited, reopened, synchronize] |
There was a problem hiding this comment.
| types: [opened, edited, reopened, synchronize] | |
| types: [opened, edited, reopened] |
you can't change title on push - not sure why it is needed. dropped synchronize
| on: | ||
| pull_request_target: | ||
| types: [opened, edited, reopened, synchronize] | ||
|
|
There was a problem hiding this comment.
add conmcurrency to avoid race conditions
concurrency:
group: pr-validation-${{ github.event.pull_request.number }}
cancel-in-progress: true
# Conflicts: # charts/mlrun-ce/Chart.yaml
| apiVersion: v1 | ||
| name: mlrun-ce | ||
| version: 0.11.0-rc.34 | ||
| version: 0.11.0-rc.35 |
There was a problem hiding this comment.
you can remove all changes on this file
📝 Description
This PR adds the following: