@cbs-consulting/generator-btp 1.2.9 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
[alias]
|
|
2
2
|
# Helper aliases for ticket workflow
|
|
3
|
+
cleanup-branches = "!f() {\n current_branch=$(git symbolic-ref --short HEAD);\n default_branch=$(git default-branch);\n if [ $? -ne 0 ]; then\n echo \"Error: Could not determine default branch\" >&2;\n return 1;\n fi;\n deleted_any=false;\n\n for branch in $(git branch --format=\"%(refname:short)\"); do\n if [ \"$branch\" = \"$current_branch\" ] || [ \"$branch\" = \"$default_branch\" ]; then\n continue;\n fi\n\n upstream=$(git for-each-ref --format=\"%(upstream:short)\" refs/heads/\"$branch\")\n if [ -z \"$upstream\" ]; then\n echo \" Skipping $branch - No upstream tracking branch\"\n continue;\n fi\n\n if git branch -d \"$branch\" >/dev/null 2>&1; then\n if [ \"$deleted_any\" = false ]; then\n echo \"Deleting branches:\";\n deleted_any=true;\n fi\n echo \" $branch - Remote: $upstream\"\n else\n echo \" Not deleting $branch - Remote: $upstream (not merged or has unpushed commits)\"\n fi\n done\n\n if [ \"$deleted_any\" = false ]; then\n echo \"No branches to delete.\"\n fi\n}; f"
|
|
3
4
|
extract-branch-parts = "!f() { current_branch=$(git branch --show-current); case \"$current_branch\" in */*) prefix=\"${current_branch%%/*}\"; ticketRef=\"${current_branch#*/}\"; echo \"$prefix|$ticketRef\" ;; *) echo \"Error: Branch name must contain a prefix (e.g., feature/ABC-123)\" >&2; return 1 ;; esac; }; f"
|
|
4
5
|
capitalize-prefix = "!f() { first_char=$(printf '%s' \"$1\" | cut -c1 | tr '[:lower:]' '[:upper:]'); rest_chars=$(printf '%s' \"$1\" | cut -c2-); echo \"$first_char$rest_chars\"; }; f"
|
|
5
6
|
format-pr-url = "!f() { pr_id=\"$1\"; remote_url=$(git config --get remote.origin.url | sed 's|https://[^@]*@|https://|'); base_url=$(echo \"$remote_url\" | sed 's|\\.git$||'); echo \"${base_url}/pullrequest/${pr_id}\"; }; f"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cbs-consulting/generator-btp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Yeoman generator for bootstrapping CAP/UI5 projects with TypeScript, ESLint, and other essential configurations",
|
|
6
6
|
"main": "generators/app/index.js",
|