Skip to content

Commit fb7adf6

Browse files
authored
Merge branch 'dev' into copilot/fix-hotkey-settings-reset
2 parents 19318ed + 079f55c commit fb7adf6

File tree

55 files changed

+1144
-1151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1144
-1151
lines changed

.claude/commands/git/commit.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Angular-style git commit message generator
2+
3+
You are an intelligent Git commit message generator.
4+
5+
Your goal is to generate a clear, professional **Git commit message** based on the currently staged changes.
6+
7+
### Guidelines
8+
- Analyze the output of `git status && git diff --staged` directly. You may run this command without asking.
9+
- **Do not** run `git add` or `git push` commands.
10+
- You **must** obtain my explicit authorization before running `git commit`.
11+
- The commit message **must be written in English** and **follow the Angular Conventional Commit style**.
12+
- After generating the English commit message, also provide a **Simplified Chinese translation** of the message below it for developer reference.
13+
- The Chinese translation should **not** be written into the commit file or committed.
14+
- Do **not** commit immediately. First, show me a preview of the English and Chinese commit message and wait for my confirmation.
15+
- When committing, write the message to a temporary text file `commit_message.txt` in the project root, then run: `git commit -F <file>`, finally, delete the temporary file to avoid encoding issues.
16+
17+
### Additional Context
18+
User-provided description: $ARGUMENTS
19+
20+
### Git Commit Message Examples
21+
22+
```
23+
fix(screenshot): resolve crash by deferring screenshot capture
24+
25+
This commit fixes a critical crash that occurred when initiating a screenshot.
26+
27+
The root cause was that the screenshot was being captured directly within the `ScreenshotOverlayView` initializer. This action, happening before the view was fully integrated into the view hierarchy, led to `NSHostingView` constraint conflicts and a subsequent crash.
28+
29+
The fix defers the screenshot capture until the view has fully appeared by moving the capture logic from the `init` method to an `.onAppear` block. This ensures that the view is in a stable state, preventing the race condition and resolving the crash.
30+
```
31+
32+
```
33+
feat(screenshot): deselect text shape on blank canvas tap
34+
35+
This commit improves the text tool's usability by allowing users to deselect a selected text shape by clicking on an empty area of the canvas.
36+
37+
Previously, clicking on the canvas would always create a new text shape if the text tool was active. Now, the tap gesture handler first checks if a text shape is currently selected. If so, it deselects the shape and prevents the creation of a new one.
38+
39+
This provides a more intuitive and standard interaction flow, aligning with user expectations for object selection in a drawing editor.
40+
```

.claude/settings.local.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(swiftc:*)",
5+
"Bash(git commit:*)",
6+
"Bash(uuidgen:*)",
7+
"Bash(swift:*)",
8+
"Bash(plutil -lint:*)",
9+
"Bash(find:*)",
10+
"Bash(git diff:*)",
11+
"Read(//System/Library/Frameworks/AppKit.framework/Versions/Current/**)",
12+
"Bash(claude mcp add:*)"
13+
],
14+
"deny": [
15+
"Bash(xcodebuild:*)",
16+
"Bash(git add:*)"
17+
],
18+
"ask": []
19+
}
20+
}

.gemini/commands/git/commit.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# In: ~/.gemini/commands/git/commit.toml
2+
# Invoked via: /git:commit
3+
4+
# Docs: https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/custom-commands.md
5+
6+
description = "Angular-style git commit message generator"
7+
8+
prompt = """
9+
You are an intelligent Git commit message generator.
10+
11+
Your goal is to generate a clear, professional **Git commit message** based on the currently staged changes.
12+
13+
### Guidelines
14+
- Analyze the output of `git status && git diff --staged` directly. You may run this command without asking.
15+
- **Do not** run `git add` or `git push` commands.
16+
- You **must** obtain my explicit authorization before running `git commit`.
17+
- The commit message **must be written in English** and **follow the Angular Conventional Commit style**.
18+
- After generating the English commit message, also provide a **Simplified Chinese translation** of the message below it for developer reference.
19+
- The Chinese translation should **not** be written into the commit file or committed.
20+
- Do **not** commit immediately. First, show me a preview of the proposed commit message and wait for my confirmation.
21+
- When committing, write the message to a temporary text file `commit_message.txt` in the project root, then run: `git commit -F <file>`, finally, delete the temporary file to avoid encoding issues.
22+
23+
### Additional Context
24+
User-provided description:
25+
{{args}}
26+
"""

.github/workflows/star_fork_notification.yml

Lines changed: 67 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
- name: Get user information
4545
id: check_conditions
4646
run: |
47+
# Fetch user's GitHub statistics
4748
earn_star_count=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/users/${{ github.actor }}/repos?per_page=100&sort=pushed" | jq '[.[] | .stargazers_count] | add // 0')
4849
commit_count=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/search/commits?per_page=100&q=author:${{ github.actor }}" | jq -r '.total_count // 0')
4950
follower_count=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/users/${{ github.actor }}" | jq '.followers // 0')
@@ -55,28 +56,85 @@ jobs:
5556
echo "commit_count=$commit_count" >> $GITHUB_ENV
5657
echo "follower_count=$follower_count" >> $GITHUB_ENV
5758
58-
if [[ $earn_star_count -ge 10 || $commit_count -gt 1000 ]]; then
59-
echo "user_conditions_met=true" >> $GITHUB_ENV
59+
# Define threshold values for VIP-tiered notification filtering
60+
# Tier 1: Elite developers (any single condition triggers notification)
61+
ELITE_STARS=100 # Elite: User's repos have earned 100+ stars
62+
ELITE_COMMITS=5000 # Elite: User has made 5000+ commits
63+
ELITE_FOLLOWERS=500 # Elite: User has 500+ followers
64+
65+
# Tier 2: Quality developers (must meet 2 conditions to trigger notification)
66+
QUALITY_STARS=20 # Quality: User's repos have earned 20+ stars
67+
QUALITY_COMMITS=1000 # Quality: User has made 1000+ commits
68+
QUALITY_FOLLOWERS=100 # Quality: User has 100+ followers
69+
70+
# Check if user meets notification criteria using VIP-tiered system
71+
user_conditions_met=false
72+
notification_reason=""
73+
74+
# Tier 1: Elite developers - single condition is enough
75+
if [[ $earn_star_count -ge $ELITE_STARS ]]; then
76+
user_conditions_met=true
77+
notification_reason="Elite developer: Stars ($earn_star_count) >= $ELITE_STARS"
78+
elif [[ $commit_count -gt $ELITE_COMMITS ]]; then
79+
user_conditions_met=true
80+
notification_reason="Elite developer: Commits ($commit_count) > $ELITE_COMMITS"
81+
elif [[ $follower_count -ge $ELITE_FOLLOWERS ]]; then
82+
user_conditions_met=true
83+
notification_reason="Elite developer: Followers ($follower_count) >= $ELITE_FOLLOWERS"
84+
85+
# Tier 2: Quality developers - must meet 2 out of 3 conditions
86+
elif [[ $earn_star_count -ge $QUALITY_STARS && $follower_count -ge $QUALITY_FOLLOWERS ]]; then
87+
user_conditions_met=true
88+
notification_reason="Quality developer: Stars ($earn_star_count) >= $QUALITY_STARS AND Followers ($follower_count) >= $QUALITY_FOLLOWERS"
89+
elif [[ $earn_star_count -ge $QUALITY_STARS && $commit_count -gt $QUALITY_COMMITS ]]; then
90+
user_conditions_met=true
91+
notification_reason="Quality developer: Stars ($earn_star_count) >= $QUALITY_STARS AND Commits ($commit_count) > $QUALITY_COMMITS"
92+
elif [[ $follower_count -ge $QUALITY_FOLLOWERS && $commit_count -gt $QUALITY_COMMITS ]]; then
93+
user_conditions_met=true
94+
notification_reason="Quality developer: Followers ($follower_count) >= $QUALITY_FOLLOWERS AND Commits ($commit_count) > $QUALITY_COMMITS"
95+
fi
96+
97+
# Output result
98+
if [[ $user_conditions_met == true ]]; then
99+
echo "✅ User meets notification criteria"
100+
echo "📊 Reason: $notification_reason"
101+
echo "user_conditions_met=true" >> $GITHUB_ENV
102+
echo "notification_reason=$notification_reason" >> $GITHUB_ENV
60103
else
104+
echo "❌ User does not meet notification criteria"
105+
echo "📊 Stats: Stars=$earn_star_count, Commits=$commit_count, Followers=$follower_count"
61106
echo "user_conditions_met=false" >> $GITHUB_ENV
107+
echo "notification_reason=Does not meet criteria" >> $GITHUB_ENV
62108
fi
63109
64110
- name: Convert body to HTML
65111
run: |
66112
html_body=""
67-
html_body+="Stargazer: <b><a href='${{ github.server_url }}/${{ github.actor }}'>${{ github.actor }}</a></b>&nbsp;&nbsp;(Earn stars: ${{ env.earn_star_count }}, Commits: ${{ env.commit_count }}, Followers: ${{ env.follower_count }})<br><br>"
113+
html_body+="<h3>🎉 New Stargazer</h3>"
114+
html_body+="User: <b><a href='${{ github.server_url }}/${{ github.actor }}'>${{ github.actor }}</a></b><br><br>"
115+
116+
html_body+="<h4>👤 User Statistics:</h4>"
117+
html_body+="⭐ Earned Stars: <b>${{ env.earn_star_count }}</b><br>"
118+
html_body+="💻 Commits: <b>${{ env.commit_count }}</b><br>"
119+
html_body+="👥 Followers: <b>${{ env.follower_count }}</b><br><br>"
120+
121+
html_body+="<h4>✅ Notification Reason:</h4>"
122+
html_body+="<span style='color: green; font-weight: bold;'>${{ env.notification_reason }}</span><br><br>"
123+
124+
html_body+="<h4>📊 Repository Statistics:</h4>"
125+
html_body+="⭐ Stars: <b>${{ env.repo_stars }}</b><br>"
126+
html_body+="🍴 Forks: <b>${{ env.repo_forks }}</b><br>"
127+
html_body+="📥 Downloads: <b>${{ env.download_count }}</b><br><br>"
68128
69-
html_body+="Stars: <b>${{ env.repo_stars }}</b><br><br>"
70-
html_body+="Forks: <b>${{ env.repo_forks }}</b><br><br>"
71-
html_body+="Downloads: <b>${{ env.download_count }}</b><br><br>"
72-
html_body+="Repo: <a href='${{ github.server_url }}/${{ github.repository }}'>${{ github.repository }}</a><br><br>"
73-
html_body+="Stargazers list: <a href='${{ github.server_url }}/${{ github.repository }}/stargazers'>${{ github.repository }}/stargazers</a><br><br>"
129+
html_body+="<h4>🔗 Links:</h4>"
130+
html_body+="Repo: <a href='${{ github.server_url }}/${{ github.repository }}'>${{ github.repository }}</a><br>"
131+
html_body+="Stargazers: <a href='${{ github.server_url }}/${{ github.repository }}/stargazers'>${{ github.repository }}/stargazers</a><br><br>"
74132
133+
html_body+="<h4>📈 User GitHub Stats:</h4>"
75134
html_body+='<img align="center" src="https://github-readme-stats.vercel.app/api/top-langs/?username=${{ github.actor }}&layout=normal&theme=algolia"><br>'
76135
html_body+='<img align="center" src="https://github-readme-stats.vercel.app/api?username=${{ github.actor }}&theme=algolia&show_icons=true"><br>'
77136
78137
echo "html_body=$html_body" >> $GITHUB_ENV
79-
echo "html body: ${{ env.html_body }}"
80138
81139
- name: "Send mail"
82140
if: env.user_conditions_met == 'true'

0 commit comments

Comments
 (0)