From aa744235c0c8890f988074bf3f74ddc109a1dc61 Mon Sep 17 00:00:00 2001 From: "Tobias.Mikula" Date: Fri, 12 Jun 2026 13:43:13 +0200 Subject: [PATCH] FEAT: Implementation of new version of RN Generator --- .github/pull_request_template.md | 11 ++++ .github/workflows/check_pr_release_notes.yml | 19 +++--- .github/workflows/release_draft.yml | 68 ++++++++++++-------- 3 files changed, 63 insertions(+), 35 deletions(-) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..323ac01 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ + +## Overview + + +## Release Notes +- TBD: 1st item of release notes +- TBD: 2nd item of release notes + + +## Related +Closes #issue_number diff --git a/.github/workflows/check_pr_release_notes.yml b/.github/workflows/check_pr_release_notes.yml index 087ed3c..5a6f2cf 100644 --- a/.github/workflows/check_pr_release_notes.yml +++ b/.github/workflows/check_pr_release_notes.yml @@ -4,6 +4,7 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at +# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software @@ -13,31 +14,33 @@ # limitations under the License. # -name: Check PR Release Notes in Description +name: Check PR Release Notes on: pull_request: types: [opened, synchronize, reopened, edited, labeled, unlabeled] branches: [ master ] -env: - SKIP_LABEL: 'no RN' - RLS_NOTES_TAG_REGEX: 'Release Notes:' +concurrency: + group: release-notes-check-${{ github.ref }} + cancel-in-progress: true jobs: check-release-notes: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v5.1.1 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 with: - python-version: '3.11' + python-version: '3.14' - name: Check presence of release notes in PR description - uses: AbsaOSS/release-notes-presence-check@v0.2.1 + uses: AbsaOSS/release-notes-presence-check@8e586b26a5e27f899ee8590a5d988fd4780a3dbf env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: github-repository: ${{ github.repository }} pr-number: ${{ github.event.number }} - skip-labels: "no RN" + title: "## [Rr]elease [Nn]otes" + skip-labels: 'no RN' + skip-placeholders: 'TBD' diff --git a/.github/workflows/release_draft.yml b/.github/workflows/release_draft.yml index f3be05c..42798e5 100644 --- a/.github/workflows/release_draft.yml +++ b/.github/workflows/release_draft.yml @@ -4,6 +4,7 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at +# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software @@ -13,7 +14,7 @@ # limitations under the License. # -name: Create release draft +name: Draft Release on: workflow_dispatch: inputs: @@ -21,35 +22,42 @@ on: description: 'Name of git tag to be created, and then draft release created. Syntax: "v[0-9]+.[0-9]+.[0-9]+".' required: true from-tag-name: - description: 'Name of the git tag from which to detect changes from. Default value: latest tag. Syntax: "v[0-9]+.[0-9]+.[0-9]+".' + description: >- + Name of the git tag from which to detect changes from. + Default value: latest tag. Syntax: "v[0-9]+.[0-9]+.[0-9]+". required: false +permissions: + contents: write + issues: read + pull-requests: read + jobs: release-draft: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with: fetch-depth: 0 persist-credentials: false - - uses: actions/setup-python@v5.1.1 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 with: - python-version: '3.11' + python-version: '3.14' - - name: Check format of received tag + - name: Check format of received target tag id: check-version-tag - uses: AbsaOSS/version-tag-check@v0.3.0 + uses: AbsaOSS/version-tag-check@4145e48bf3f77a5afff2ec9afdd8afb6b53bce34 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - github-repository: ${{ github.repository }} - version-tag: ${{ github.event.inputs.tag-name }} + github-repository: ${{ github.repository }} + version-tag: ${{ github.event.inputs.tag-name }} - name: Check format of received from tag if: ${{ github.event.inputs.from-tag-name }} id: check-version-from-tag - uses: AbsaOSS/version-tag-check@v0.3.0 + uses: AbsaOSS/version-tag-check@4145e48bf3f77a5afff2ec9afdd8afb6b53bce34 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -59,31 +67,38 @@ jobs: - name: Generate Release Notes id: generate_release_notes - uses: AbsaOSS/generate-release-notes@v0.6.0 + uses: AbsaOSS/generate-release-notes@da535383f54a6532adb84e88d3b6e5c7236132df env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: + release-notes-title: "## [Rr]elease [Nn]otes" tag-name: ${{ github.event.inputs.tag-name }} from-tag-name: ${{ github.event.inputs.from-tag-name }} chapters: | - - { title: No entry 🚫, label: duplicate } - - { title: No entry 🚫, label: no RN } - - { title: Breaking Changes πŸ’₯, label: breaking-change } - - { title: New Features πŸŽ‰, label: enhancement } - - { title: New Features πŸŽ‰, label: feature } - - { title: Bugfixes πŸ› , label: bug } - - { title: Infrastructure βš™οΈ, label: infrastructure } - - { title: Silent-live 🀫, label: silent-live } - - { title: Documentation πŸ“œ, label: documentation } + - { title: Breaking Changes πŸ’₯, label: breaking change, order: 10 } + - { title: Epics πŸš€, label: epic, order: 20 } + - { title: New Features πŸŽ‰, label: enhancement, order: 30 } + - { title: Bugfixes πŸ› , label: bug, order: 40 } + - { title: Infrastructure βš™οΈ, label: infrastructure, order: 50 } + - { title: Spikes πŸ’‘, label: spike, order: 60 } + - { title: Refactoring πŸ”¨, label: refactoring, order: 70 } + - { title: Documentation️ πŸ“–, label: documentation, order: 80 } + - { title: Entries to skip 🚫, label: duplicate, hidden: true, order: 99 } + - { title: Entries to skip 🚫, label: no RN, hidden: true, order: 99 } warnings: true + print-empty-chapters: false + row-format-issue: '{type}: {number} _{title}_ by {developers} in {pull-requests}' + row-format-pr: '{number} _{title}_ by {developers}' - - name: Create and Push Tag - uses: actions/github-script@v7 + - name: Create and push tag + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 + env: + TAG_NAME: ${{ github.event.inputs.tag-name }} with: script: | - const tag = core.getInput('tag-name') + const tag = process.env.TAG_NAME; const ref = `refs/tags/${tag}`; - const sha = context.sha; // The SHA of the commit to tag + const sha = context.sha; await github.rest.git.createRef({ owner: context.repo.owner, @@ -94,10 +109,9 @@ jobs: console.log(`Tag created: ${tag}`); github-token: ${{ secrets.GITHUB_TOKEN }} - tag-name: ${{ github.event.inputs.tag-name }} - - name: Create Draft Release - uses: softprops/action-gh-release@v1 + - name: Create draft release + uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: