first commit

This commit is contained in:
2024-10-05 10:06:52 +02:00
commit 0784cad8af
57 changed files with 965 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#
unset GITHUB_TOKEN
# Extract type and description from commit message
type=$1; shift
description="$@"
commit_message="$type: $description"
# Check if a commit message was provided
if [ -z "$1" ] || [ -z "$description" ]; then
echo "Usage: rollout <type> <...description>"
exit 1
fi
# Create branch name following Conventional Commit syntax
branch_name="${type}/$(echo "$description" | tr ' ' '-' | tr '[:upper:]' '[:lower:]')"
echo "Creating and checking out branch: $branch_name"
git checkout -b "$branch_name" || exit 1
# Add all changes
git add . || exit 1
echo "Committing with message: \"$commit_message\""
git commit -m "$commit_message" || exit 1
echo "Pushing branch to origin..."
git push --set-upstream origin HEAD || exit 1
echo "Creating a Pull Request..."
gh pr create --fill
echo "Rollout complete."