This commit is contained in:
2024-10-08 06:41:47 +02:00
parent 1ef33c16af
commit 7300938372
103 changed files with 619 additions and 198 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."

View File

@@ -0,0 +1,4 @@
host github.com
hostname ssh.github.com
user git
port 443

View File

@@ -0,0 +1,3 @@
---
dependencies:
- role: base_info

View File

@@ -0,0 +1,47 @@
---
- name: Install dependencies
tags:
- install
ansible.builtin.package:
name:
- git
- git-delta
- name: Copy config
tags:
- config
ansible.builtin.file:
mode: "{{ item.mode }}"
path: "{{ home }}/{{ item.path }}"
state: directory
with_community.general.filetree:
- ../files
loop_control:
label: "{{ item.path }}"
when: item.state == 'directory'
- name: "Copy templates"
tags:
- config
ansible.builtin.template:
src: "{{ item.src }}"
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
mode: "{{ item.mode }}"
with_community.general.filetree:
- ../templates
loop_control:
label: "{{ item.path }}"
when: item.state == 'file'
- name: Copy config
tags:
- config
ansible.builtin.copy:
src: "{{ item.src }}"
dest: "{{ home }}/{{ item.path }}"
mode: "{{ item.mode }}"
with_community.general.filetree:
- ../files
loop_control:
label: "{{ item.path }}"
when: item.state == 'file'

View File

@@ -0,0 +1,53 @@
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
[alias]
graph = log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%C(blue)%x20(%ce)%x20%C(cyan)[gpg:%GK%x20%G?]%C(reset)%n%x20%s%n"
ll = log --oneline
st = status -sb
cm = commit -m
append = commit --amend --no-edit
sobmodules = submodule update --init --recursive
df = difftool -t nvimdiff -y
last = log -1 --stat
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
brr = branch --remote --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
undo = reset HEAD~1 --mixed
unstage = reset HEAD --
[difftool "nvimdiff"]
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
[commit]
gpgsign = true
[url "https://"]
insteadOf = git://
[core]
pager = delta
hooksPath = /dev/null
[interactive]
diffFilter = delta --color-only
[pull]
ff = only
[init]
defaultBranch = main
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[includeIf "gitdir:~/Projects/zeronorth/"]
path = ~/Projects/zeronorth/.gitconfig
[includeIf "gitdir:~/Projects/private/"]
path = ~/Projects/private/.gitconfig
[push]
autoSetupRemote = true