From bbeb543312ea144c60c874356568e84f03e6b4be Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Sat, 11 Jul 2026 08:21:59 +0200 Subject: [PATCH 1/2] chore: add update-stable-titles workflow - helps with dependabot now triggered for stables Signed-off-by: Maksim Sukharev --- .github/workflows/update-stable-titles.yml | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/update-stable-titles.yml diff --git a/.github/workflows/update-stable-titles.yml b/.github/workflows/update-stable-titles.yml new file mode 100644 index 00000000..ca8be8bf --- /dev/null +++ b/.github/workflows/update-stable-titles.yml @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT +name: Update PRs titles on stable branches + +on: + pull_request: + types: [opened, edited] + branches: + - "stable*" + +concurrency: + group: stable-pr-title-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + update-pr-title: + runs-on: ubuntu-latest-low + permissions: + pull-requests: write + contents: read + + steps: + - name: Wait for potential title edits + run: sleep 15 + + - name: Get PR details and update title + # Renovate already have target branch in the title + if: github.event.pull_request.user.login != 'renovate[bot]' + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const { data: pr } = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + }); + + const baseBranch = pr.base.ref; + const currentTitle = pr.title; + + // Check if this is a stable branch + // Should not happen as we only trigger on stable* branches 🤷‍♀️ + if (!baseBranch.startsWith('stable')) { + console.log(`Not a stable branch: ${baseBranch}`); + return; + } + + const prefix = `[${baseBranch}]`; + + // Check if title already has the correct prefix and no other stable tags + const correctTagRegex = new RegExp(`^\\[${baseBranch}\\]\\s*`); + const hasOtherStableTags = /\[stable[\d.]*\]/.test(currentTitle.replace(correctTagRegex, '')); + + if (correctTagRegex.test(currentTitle) && !hasOtherStableTags) { + console.log(`Title already has correct prefix only: ${currentTitle}`); + return; + } + + // Remove all stable tags and add the correct one + const cleanTitle = currentTitle.replace(/\[stable[\d.]*\]\s*/g, '').trim(); + const newTitle = `${prefix} ${cleanTitle}`; + + console.log(`Updating title from: "${currentTitle}" to: "${newTitle}"`); + + await github.rest.pulls.update({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + title: newTitle, + }); From 9c57079d1b32d303d186d6b178e2360b1b6d565d Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Sat, 11 Jul 2026 08:27:06 +0200 Subject: [PATCH 2/2] chore: add IDE directories to .gitignore Signed-off-by: Maksim Sukharev --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index 13b78603..93fa2784 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,13 @@ vendor/ build/ *.cache + +# VScode settings +.vscode/ +*.code-workspace + +# JetBrains IDEs settings +.idea/ + +# JetBrains Fleet settings +.fleet/