Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions .github/workflows/update-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
issues:
types: [opened, closed, reopened]
pull_request:
types: [opened, closed, reopened]
types: [opened, closed, reopened, synchronize]

jobs:
update-tracking:
Expand All @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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
```

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion ollama/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions restore/update_and_restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
4 changes: 2 additions & 2 deletions setup-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 []."
Expand Down