Skip to content

Commit d046ba1

Browse files
authored
Merge pull request #42 from minitap-ai/TASK-210/mobileuse-dd-windsurf-workflow-to-create-a-pull-request-title-description
feat: add windsurf PR title and description generation workflow
2 parents 663f4ef + 23b85ec commit d046ba1

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
description: Generate PR title and description based on git diff from main branch
3+
auto_execution_mode: 3
4+
---
5+
6+
## PR Title and Description Generator
7+
8+
This workflow automatically generates a PR title and description based on the git diff between your current branch and main.
9+
10+
### Step 1: Run the git diff script
11+
12+
Windows: `mobile-use\scripts\git\get_branch_diff.ps1`
13+
MacOS / Linux: `bash "mobile-use/scripts/git/get_branch_diff.sh`
14+
15+
### Step 2: Generate PR title and description
16+
17+
Based on the git diff and commit history output above, generate a concise PR title following conventional commit format (eventually with scope) and a brief description with bullet points.
18+
19+
Title:
20+
21+
```
22+
The PR title will appear here
23+
```
24+
25+
Description:
26+
27+
```
28+
The PR description with bullet points will appear here:
29+
30+
- Key change 1 with purpose
31+
- Key change 2 with technical details
32+
- Additional context if needed
33+
```

scripts/git/get_branch_diff.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# PowerShell script to get diff and log between current branch and main
2+
3+
# Making sure we get the diff from mobile-use
4+
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
5+
Set-Location $scriptDir/..
6+
7+
$mergeBase = git merge-base origin/main HEAD
8+
9+
Write-Output "=== Git Diff between current branch and main ==="
10+
git diff "$mergeBase..HEAD"
11+
12+
Write-Output "`n=== Git Log between current branch and main ==="
13+
git log --oneline "$mergeBase..HEAD"

scripts/git/get_branch_diff.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Make sure we get the diff from mobile-use
4+
cd "$(dirname "$0")/.."
5+
6+
echo "=== Git Diff between current branch and main ==="
7+
git diff "$(git merge-base origin/main HEAD)..HEAD"
8+
9+
echo -e "\n=== Git Log between current branch and main ==="
10+
git log --oneline "$(git merge-base origin/main HEAD)..HEAD"

0 commit comments

Comments
 (0)