diff --git a/.github/workflows/update-tracking.yml b/.github/workflows/update-tracking.yml index 492a608..a8979cb 100644 --- a/.github/workflows/update-tracking.yml +++ b/.github/workflows/update-tracking.yml @@ -5,7 +5,7 @@ on: issues: types: [opened, closed, reopened] pull_request: - types: [opened, closed, reopened] + types: [opened, closed, reopened, synchronize] jobs: update-tracking: @@ -19,34 +19,21 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const trackingIssueNumber = 52; + const trackingIssueNumber = 5; - // Get event details const { action, number } = context.payload; const isIssue = context.eventName === 'issues'; const item = context.payload[isIssue ? 'issue' : 'pull_request']; const type = isIssue ? 'Issue' : 'PR'; const state = item.state; const title = item.title; - const createdAt = new Date(item.created_at).toISOString().split('T')[0]; - - // Format status emoji - const statusEmoji = state === 'open' ? '🔄' : - state === 'closed' && !isIssue ? '❌' : - state === 'merged' ? '🎉' : '✅'; - - // Create update message - const updateMsg = `## 🤖 Automated Update - **${type} #${number}** - ${action} - - **Title**: ${title} - - **Status**: ${statusEmoji} ${state.toUpperCase()} - - **Date**: ${createdAt} - - **Action**: ${action} + const status = state === 'open' ? 'OPEN' : + state === 'closed' && !isIssue ? 'CLOSED' : + state === 'merged' ? 'MERGED' : state.toUpperCase(); - *This tracking issue will be manually updated with full context periodically.*`; + const updateMsg = `[${type} #${number}] ${action} - ${status}: ${title}`; - // Add comment to tracking issue await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, diff --git a/README.md b/README.md index 2c9720a..7cd8739 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,8 @@ brew install dotfiles ### Option 3: Manual Clone ```bash -git clone https://github.com/dotfiles-mac/dotfiles.git ~/github-dotfiles -cd ~/github-dotfiles +git clone https://github.com/dotfiles-mac/dotfiles.git ~/dotfiles +cd ~/dotfiles ./setup-mac.sh ``` @@ -219,7 +219,7 @@ kilocode style check # Check code style To update the repository and restore the latest dotfiles to your home directory: ```bash -cd ~/github-dotfiles +cd ~/dotfiles ./restore/update_and_restore.sh ``` @@ -248,13 +248,13 @@ The setup script automatically configures Git to use the hooks globally and make 1. Make the hooks executable: ```bash - chmod +x ~/github-dotfiles/git-hooks/* + chmod +x ~/dotfiles/git-hooks/* ``` 2. Configure Git to use these hooks globally: ```bash - git config --global core.hooksPath ~/github-dotfiles/git-hooks + git config --global core.hooksPath ~/dotfiles/git-hooks ``` 3. Verify the hooks setup: diff --git a/ollama/README.md b/ollama/README.md index e041728..bc83a40 100644 --- a/ollama/README.md +++ b/ollama/README.md @@ -13,7 +13,7 @@ Clone the repository and build the tool: ```bash git clone https://github.com/dotfiles-mac/dotfiles.git -cd github-dotfiles/ollama +cd ~/dotfiles/ollama cargo build --release ``` diff --git a/restore/update_and_restore.sh b/restore/update_and_restore.sh index 9dd936c..3f0e60f 100755 --- a/restore/update_and_restore.sh +++ b/restore/update_and_restore.sh @@ -23,7 +23,7 @@ for file in "${dotfiles[@]}"; do done echo "Setting up Git hooks..." -git config --global core.hooksPath ~/github-dotfiles/git-hooks -chmod +x ~/github-dotfiles/git-hooks/* +git config --global core.hooksPath ~/dotfiles/git-hooks +chmod +x ~/dotfiles/git-hooks/* echo "Restore complete!" diff --git a/setup-mac.sh b/setup-mac.sh index 91c50f7..224447b 100755 --- a/setup-mac.sh +++ b/setup-mac.sh @@ -319,10 +319,10 @@ git config --global core.hooksPath echo "Configuring commit message scope brackets..." read -r -p "Choose bracket type for commit scopes (1 for [], 2 for ()): " bracket_choice if [ "$bracket_choice" = "1" ]; then - sed -i '' 's/(\[.+?\]|\(.+?\))/(\[.+\])/g' ~/github-dotfiles/git-hooks/pre-push + sed -i '' 's/(\[.+?\]|\(.+?\))/(\[.+\])/g' ~/dotfiles/git-hooks/pre-push echo "Set to [] brackets." elif [ "$bracket_choice" = "2" ]; then - sed -i '' 's/(\[.+?\]|\(.+?\))/(\(.+\))/g' ~/github-dotfiles/git-hooks/pre-push + sed -i '' 's/(\[.+?\]|\(.+?\))/(\(.+\))/g' ~/dotfiles/git-hooks/pre-push echo "Set to () brackets." else echo "Invalid choice, keeping default []."