From 46560a6900405ce1041f6fe78a9268e8489f5969 Mon Sep 17 00:00:00 2001 From: Ricky Heijnen Date: Sun, 5 Oct 2025 21:30:56 +0200 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=A7=A9=20Update=20boilerplate=20gener?= =?UTF-8?q?al=20(#23)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions[bot] --- .github/workflows/label-sync.yml | 84 +++++--------------------------- 1 file changed, 13 insertions(+), 71 deletions(-) diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml index d774d39..d679b11 100644 --- a/.github/workflows/label-sync.yml +++ b/.github/workflows/label-sync.yml @@ -1,75 +1,17 @@ -name: Reusable Label Sync +--- + +name: Label Sync + on: - workflow_call: - pull_request: - branches: - - main + schedule: + - cron: '0 6 * * Mon' # Weekly on Monday at 6 AM UTC + workflow_dispatch: + repository_dispatch: + types: [label-sync] + +permissions: + issues: write # Required to create and update labels jobs: label-sync: - runs-on: ubuntu-latest - steps: - - name: Determine repository type from custom properties - id: determine-type - run: | - # Fetch custom property from GitHub API - echo "Fetching repo type from custom properties..." - REPO_TYPE=$(gh api \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - "/repos/${{ github.repository }}/properties/values" \ - --jq '.[] | select(.property_name == "codebase_type") | .value' 2>/dev/null) - - if [ -z "$REPO_TYPE" ] || [ "$REPO_TYPE" = "null" ]; then - echo "No custom property 'codebase_type' found. Exiting workflow." - exit 1 - else - echo "Found custom property codebase_type: $REPO_TYPE" - fi - - echo "repo_type=$REPO_TYPE" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Determine config files - id: config - run: | - BASE_URL="https://raw.githubusercontent.com/brixion/.github/main/labels" - REPO_TYPE="${{ steps.determine-type.outputs.repo_type }}" - - # Always include general labels - CONFIG_FILES="$BASE_URL/general.yml" - - # Add type-specific labels if not general - case "$REPO_TYPE" in - "frontend") - CONFIG_FILES="$CONFIG_FILES"$'\n'"$BASE_URL/frontend.yml" - ;; - "backend") - CONFIG_FILES="$CONFIG_FILES"$'\n'"$BASE_URL/backend.yml" - ;; - "monorepo") - CONFIG_FILES="$CONFIG_FILES"$'\n'"$BASE_URL/frontend.yml"$'\n'"$BASE_URL/backend.yml" - ;; - *) - echo "Unknown repo type '$REPO_TYPE', using only general labels" - ;; - esac - - echo "Repository type: $REPO_TYPE" - echo "Config files to sync:" - echo "$CONFIG_FILES" - - # Format as multiline string for label-sync action - { - echo "config_files<> $GITHUB_OUTPUT - - - uses: EndBug/label-sync@v2 - with: - config-file: | - ${{ steps.config.outputs.config_files }} - token: ${{ secrets.GITHUB_TOKEN }} - delete-other-labels: false \ No newline at end of file + uses: brixion/.github/.github/workflows/label-sync.yml@main From 8ecac64b04feb8ee21973679b72bc72e47be4cec Mon Sep 17 00:00:00 2001 From: Volkan Welp <49623578+LegeBeker@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:17:03 +0200 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=94=A5=20Simplify=20PR=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 25 ++++++----- .../PULL_REQUEST_TEMPLATE/documentation.md | 17 ------- .github/PULL_REQUEST_TEMPLATE/feature.md | 37 --------------- .github/PULL_REQUEST_TEMPLATE/fix.md | 45 ------------------- .../PULL_REQUEST_TEMPLATE/general-extended.md | 37 --------------- .../PULL_REQUEST_TEMPLATE/general-small.md | 23 ---------- .github/PULL_REQUEST_TEMPLATE/refactor.md | 32 ------------- 7 files changed, 13 insertions(+), 203 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE/documentation.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/feature.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/fix.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/general-extended.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/general-small.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/refactor.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 02ad873..9762e7d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,18 +1,19 @@ -# Choose a Pull Request template +## ๐Ÿ” Samenvatting -1. Click the `Preview` tab above. -2. Select the most appropriate template for your PR from the list below: + ---- +Deze PR ... -## **General Templates +## ๐Ÿ“ Beschrijving -- [๐Ÿ“‘ General PR (Short)](?expand=1&template=general-small.md) -- [๐Ÿ“‘ General PR (Extended)](?expand=1&template=general-extended.md) + -## Specific templates +- +- +- -- [๐Ÿ“ Documentation](?expand=1&template=documentation.md) -- [โœจ Feature](?expand=1&template=feature.md) -- [๐Ÿ› Fix](?expand=1&template=fix.md) -- [โ™ป๏ธ Refactor](?expand=1&template=refactor.md) +## โœ… Checklist + +- [ ] Code is lokaal getest +- [ ] Tests zijn toegevoegd/aangepast +- [ ] Documentatie bijgewerkt (indien nodig) diff --git a/.github/PULL_REQUEST_TEMPLATE/documentation.md b/.github/PULL_REQUEST_TEMPLATE/documentation.md deleted file mode 100644 index 4e0af9d..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/documentation.md +++ /dev/null @@ -1,17 +0,0 @@ -## ๐Ÿ” Samenvatting - - - -Deze PR ... - -## ๐Ÿ“ Beschrijving - - - -- -- -- - -## ๐Ÿ’ฌ Extra informatie - - diff --git a/.github/PULL_REQUEST_TEMPLATE/feature.md b/.github/PULL_REQUEST_TEMPLATE/feature.md deleted file mode 100644 index 2f30e52..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/feature.md +++ /dev/null @@ -1,37 +0,0 @@ -## ๐Ÿ” Samenvatting - - - -Deze PR ... - -## ๐Ÿ“ Beschrijving - - - -- -- -- - -## ๐Ÿงช Testinstructies - - - -1. -1. -1. - -## ๐Ÿ“Œ Openstaande punten - - - -- [ ] - -## ๐Ÿ’ฌ Extra informatie - - - -## โœ… Checklist - -- [ ] Code is lokaal getest -- [ ] Tests toegevoegd/aangepast -- [ ] Documentatie bijgewerkt (indien nodig) diff --git a/.github/PULL_REQUEST_TEMPLATE/fix.md b/.github/PULL_REQUEST_TEMPLATE/fix.md deleted file mode 100644 index b5afa25..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/fix.md +++ /dev/null @@ -1,45 +0,0 @@ -## ๐Ÿ” Samenvatting - - - -Deze PR ... - -## ๐Ÿž Oorzaak - - - -## ๐Ÿ› ๏ธ Oplossing - - - -## ๐Ÿ“ Beschrijving - - - -- -- -- - -## ๐Ÿงช Testinstructies - - - -1. -1. -1. - -## ๐Ÿ“Œ Openstaande punten - - - -- [ ] - -## ๐Ÿ’ฌ Extra informatie - - - -## โœ… Checklist - -- [ ] Code is lokaal getest -- [ ] Tests toegevoegd -- [ ] Documentatie bijgewerkt (indien nodig) diff --git a/.github/PULL_REQUEST_TEMPLATE/general-extended.md b/.github/PULL_REQUEST_TEMPLATE/general-extended.md deleted file mode 100644 index 67f27af..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/general-extended.md +++ /dev/null @@ -1,37 +0,0 @@ -## ๐Ÿ” Samenvatting - - - -Deze PR ... - -## ๐Ÿ“ Beschrijving - - - -- -- -- - -## ๐Ÿงช Testinstructies (optioneel) - - - -1. -1. -1. - -## ๐Ÿ“Œ Openstaande punten (optioneel) - - - -- [ ] - -## ๐Ÿ’ฌ Extra informatie - - - -## โœ… Checklist - -- [ ] Code is lokaal getest -- [ ] Tests zijn toegevoegd/aangepast -- [ ] Documentatie bijgewerkt (indien nodig) diff --git a/.github/PULL_REQUEST_TEMPLATE/general-small.md b/.github/PULL_REQUEST_TEMPLATE/general-small.md deleted file mode 100644 index e7daa34..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/general-small.md +++ /dev/null @@ -1,23 +0,0 @@ -## ๐Ÿ” Samenvatting - - - -Deze PR ... - -## ๐Ÿ“ Beschrijving - - - -- -- -- - -## ๐Ÿ’ฌ Extra informatie - - - -## โœ… Checklist - -- [ ] Code is lokaal getest -- [ ] Tests zijn toegevoegd/aangepast -- [ ] Documentatie bijgewerkt (indien nodig) diff --git a/.github/PULL_REQUEST_TEMPLATE/refactor.md b/.github/PULL_REQUEST_TEMPLATE/refactor.md deleted file mode 100644 index f8220ff..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/refactor.md +++ /dev/null @@ -1,32 +0,0 @@ -## ๐Ÿ” Samenvatting - - - -Deze PR ... - -## ๐ŸŽฏ Reden van de refactor - - - -## ๐Ÿ“ Beschrijving - - - -- -- -- - -## ๐Ÿ“Œ Openstaande punten - - - -- [ ] - -## ๐Ÿ’ฌ Extra informatie - - - -## โœ… Checklist - -- [ ] Code is lokaal getest -- [ ] Tests toegevoegd/aangepast From a0242e2b5da71c40897ee2d5ce745af0d862553d Mon Sep 17 00:00:00 2001 From: Volkan Welp <49623578+LegeBeker@users.noreply.github.com> Date: Wed, 24 Dec 2025 14:26:16 +0100 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=90=9BFix=20markdown=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9762e7d..d643e2b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,3 @@ -## ๐Ÿ” Samenvatting - Deze PR ... From 5f62fba624b7d3bcd9f0f81544fe03b73d8bf905 Mon Sep 17 00:00:00 2001 From: Volkan Welp <49623578+LegeBeker@users.noreply.github.com> Date: Wed, 24 Dec 2025 14:28:01 +0100 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=90=9BFix=20markdown=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d643e2b..9762e7d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,5 @@ +## ๐Ÿ” Samenvatting + Deze PR ... From 1ae52aa2e6a3110d2b72835055b4fe4afa2b4efb Mon Sep 17 00:00:00 2001 From: Volkan Welp <49623578+LegeBeker@users.noreply.github.com> Date: Wed, 24 Dec 2025 14:39:08 +0100 Subject: [PATCH 5/6] =?UTF-8?q?=E2=AC=85=EF=B8=8F=20Revert=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/label-sync.yml | 84 +++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 13 deletions(-) diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml index d679b11..d774d39 100644 --- a/.github/workflows/label-sync.yml +++ b/.github/workflows/label-sync.yml @@ -1,17 +1,75 @@ ---- - -name: Label Sync - +name: Reusable Label Sync on: - schedule: - - cron: '0 6 * * Mon' # Weekly on Monday at 6 AM UTC - workflow_dispatch: - repository_dispatch: - types: [label-sync] - -permissions: - issues: write # Required to create and update labels + workflow_call: + pull_request: + branches: + - main jobs: label-sync: - uses: brixion/.github/.github/workflows/label-sync.yml@main + runs-on: ubuntu-latest + steps: + - name: Determine repository type from custom properties + id: determine-type + run: | + # Fetch custom property from GitHub API + echo "Fetching repo type from custom properties..." + REPO_TYPE=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/${{ github.repository }}/properties/values" \ + --jq '.[] | select(.property_name == "codebase_type") | .value' 2>/dev/null) + + if [ -z "$REPO_TYPE" ] || [ "$REPO_TYPE" = "null" ]; then + echo "No custom property 'codebase_type' found. Exiting workflow." + exit 1 + else + echo "Found custom property codebase_type: $REPO_TYPE" + fi + + echo "repo_type=$REPO_TYPE" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Determine config files + id: config + run: | + BASE_URL="https://raw.githubusercontent.com/brixion/.github/main/labels" + REPO_TYPE="${{ steps.determine-type.outputs.repo_type }}" + + # Always include general labels + CONFIG_FILES="$BASE_URL/general.yml" + + # Add type-specific labels if not general + case "$REPO_TYPE" in + "frontend") + CONFIG_FILES="$CONFIG_FILES"$'\n'"$BASE_URL/frontend.yml" + ;; + "backend") + CONFIG_FILES="$CONFIG_FILES"$'\n'"$BASE_URL/backend.yml" + ;; + "monorepo") + CONFIG_FILES="$CONFIG_FILES"$'\n'"$BASE_URL/frontend.yml"$'\n'"$BASE_URL/backend.yml" + ;; + *) + echo "Unknown repo type '$REPO_TYPE', using only general labels" + ;; + esac + + echo "Repository type: $REPO_TYPE" + echo "Config files to sync:" + echo "$CONFIG_FILES" + + # Format as multiline string for label-sync action + { + echo "config_files<> $GITHUB_OUTPUT + + - uses: EndBug/label-sync@v2 + with: + config-file: | + ${{ steps.config.outputs.config_files }} + token: ${{ secrets.GITHUB_TOKEN }} + delete-other-labels: false \ No newline at end of file From bae07587d1c1d84813ca0570a1635604a3412756 Mon Sep 17 00:00:00 2001 From: Volkan Welp <49623578+LegeBeker@users.noreply.github.com> Date: Wed, 24 Dec 2025 14:42:39 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=94=A5Remove=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9762e7d..76c614c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,9 @@ ## ๐Ÿ” Samenvatting - - Deze PR ... ## ๐Ÿ“ Beschrijving - - - - -