diff --git a/.cspell.json b/.cspell.json index e09e6a7ebef..002194d180c 100644 --- a/.cspell.json +++ b/.cspell.json @@ -82,6 +82,7 @@ "COMPATBILITY", "confs", "Consolas", + "Containerised", "cpath", "cpcommerce", "cpus", @@ -1081,6 +1082,9 @@ "Rsya", "rivo", "mergify", - "ncdu" + "ncdu", + "interactjs", + "ocpu", + "Twillio" ] } diff --git a/.github/workflows/auto-backport-master-to-develop.yml b/.github/workflows/auto-backport-master-to-develop.yml index a98ad54e654..433a3427f8c 100644 --- a/.github/workflows/auto-backport-master-to-develop.yml +++ b/.github/workflows/auto-backport-master-to-develop.yml @@ -6,18 +6,17 @@ on: - master permissions: - contents: read + contents: write pull-requests: write jobs: create-pr: runs-on: ubuntu-latest - # Skip if the commit message contains merge-related keywords if: | !contains(github.event.head_commit.message, 'Merge pull request') && !contains(github.event.head_commit.message, 'Merge branch') && !startsWith(github.event.head_commit.message, 'Merge') - + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -30,21 +29,33 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - - name: Get commit details - id: commit-info + - name: Prepare backport_master branch (Rebase) run: | git fetch origin develop + git fetch origin master - COMMITS=$(git log origin/develop..HEAD --pretty=format:"- %h %s") - - # Store commits in a file to handle multiline content + # Create/update backport_master from develop + git checkout -B backport_master origin/develop + + # Rebase onto master to avoid merge commits + git rebase origin/master || { + echo "Rebase conflict detected, aborting." + git rebase --abort + exit 1 + } + + git push origin backport_master --force-with-lease + + - name: Get commit details + run: | + git fetch origin develop + COMMITS=$(git log origin/develop..origin/backport_master --pretty=format:"- %h %s") echo "$COMMITS" > commits.txt - name: Check if PR already exists id: check-pr run: | - # Check if there's already an open PR from master to develop - EXISTING_PR=$(gh pr list --head master --base develop --state open --json number --jq '.[0].number // empty') + EXISTING_PR=$(gh pr list --head backport_master --base develop --state open --json number --jq '.[0].number // empty') echo "existing_pr=$EXISTING_PR" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -52,19 +63,15 @@ jobs: - name: Create Pull Request if: steps.check-pr.outputs.existing_pr == '' run: | - # Read commits from file COMMITS_LIST=$(cat commits.txt) - - # Create PR description with merge instruction - PR_DESCRIPTION="**Please perform \`Merge & Commit\` to preserve commit history to avoid commit conflicts** + PR_DESCRIPTION="**Please perform \`Merge & Commit\` to preserve commit history** $COMMITS_LIST" - # Create the PR gh pr create \ --title "chore: Sync Changes from Master to Develop" \ --body "$PR_DESCRIPTION" \ - --head master \ + --head backport_master \ --base develop env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -72,13 +79,11 @@ jobs: - name: Update existing PR if: steps.check-pr.outputs.existing_pr != '' run: | - # Read commits from file COMMITS_LIST=$(cat commits.txt) - PR_DESCRIPTION="**Please perform \`Merge & Commit\` to preserve commit history to avoid commit conflicts** + PR_DESCRIPTION="**Please perform \`Merge & Commit\` to preserve commit history** $COMMITS_LIST" - - # Update the existing PR + gh pr edit ${{ steps.check-pr.outputs.existing_pr }} \ --body "$PR_DESCRIPTION" env: diff --git a/backbone/tests/__init__.py b/backbone/tests/__init__.py index 5301bf841f4..559967729fe 100644 --- a/backbone/tests/__init__.py +++ b/backbone/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe and contributors # For license information, please see license.txt import unittest @@ -8,9 +7,7 @@ def run_tests(): - coverage = Coverage( - source=[str(Path(__file__).parent.parent)], omit=["*/tests/*"], branch=True - ) + coverage = Coverage(source=[str(Path(__file__).parent.parent)], omit=["*/tests/*"], branch=True) coverage.start() unittest.main(module=None, argv=["", "discover", "-s", "backbone"], exit=False) coverage.stop() diff --git a/backbone/tests/test_hypervisor.py b/backbone/tests/test_hypervisor.py index 798dba8b6b3..0df28fec4df 100644 --- a/backbone/tests/test_hypervisor.py +++ b/backbone/tests/test_hypervisor.py @@ -1,13 +1,13 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe and contributors # For license information, please see license.txt -import unittest from unittest.mock import MagicMock +from frappe.tests.utils import FrappeTestCase + from backbone.hypervisor import Hypervisor -class TestHypervisor(unittest.TestCase): +class TestHypervisor(FrappeTestCase): def test_preinstall_pass(self): shell = MagicMock() shell.execute.return_value.returncode = 0 diff --git a/commitlint.config.js b/commitlint.config.js index 21be2907dd4..177f5ab9bb8 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,4 +1,4 @@ -module.exports = { +export default { extends: ['@commitlint/config-conventional'], rules: { 'header-max-length': [2, 'always', 72], diff --git a/dashboard/auto-imports.d.ts b/dashboard/auto-imports.d.ts new file mode 100644 index 00000000000..9d2400790b5 --- /dev/null +++ b/dashboard/auto-imports.d.ts @@ -0,0 +1,10 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +// biome-ignore lint: disable +export {} +declare global { + +} diff --git a/dashboard/generateThemeConfig.cjs b/dashboard/generateThemeConfig.cjs deleted file mode 100644 index 56c58774e73..00000000000 --- a/dashboard/generateThemeConfig.cjs +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This node script resolves the tailwind config and dumps it as a json in - * tailwind.theme.json which is later imported into the app. - */ -let fs = require('fs'); -let resolveConfig = require('tailwindcss/resolveConfig'); -let config = require('./tailwind.config.cjs'); -let { theme } = resolveConfig(config); - -fs.writeFileSync('./tailwind.theme.json', JSON.stringify(theme, null, 2)); diff --git a/dashboard/index.html b/dashboard/index.html index e2e06dc1687..b8a3f1a027d 100644 --- a/dashboard/index.html +++ b/dashboard/index.html @@ -5,7 +5,7 @@