mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-20 02:49:30 +08:00
Add issue management automation tools
This commit is contained in:
parent
2abd05f783
commit
cbbba79340
44
.github/file-labeler.yml
vendored
Normal file
44
.github/file-labeler.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# File path specific labels
|
||||||
|
v2-only:
|
||||||
|
- 'v2/**/*'
|
||||||
|
|
||||||
|
v3-alpha:
|
||||||
|
- 'v3/**/*'
|
||||||
|
|
||||||
|
windows:
|
||||||
|
- '**/*_windows.go'
|
||||||
|
- 'v2/internal/frontend/desktop/windows/**/*'
|
||||||
|
|
||||||
|
macos:
|
||||||
|
- '**/*_darwin.go'
|
||||||
|
- 'v2/internal/frontend/desktop/darwin/**/*'
|
||||||
|
|
||||||
|
linux:
|
||||||
|
- '**/*_linux.go'
|
||||||
|
- 'v2/internal/frontend/desktop/linux/**/*'
|
||||||
|
|
||||||
|
cli:
|
||||||
|
- 'v2/cmd/**/*'
|
||||||
|
- 'v3/cmd/**/*'
|
||||||
|
- '**/cli/**/*'
|
||||||
|
- '**/commands/**/*'
|
||||||
|
|
||||||
|
documentation:
|
||||||
|
- '**/*.md'
|
||||||
|
- 'docs/**/*'
|
||||||
|
- 'website/**/*'
|
||||||
|
- 'mkdocs-website/**/*'
|
||||||
|
|
||||||
|
templates:
|
||||||
|
- '**/templates/**/*'
|
||||||
|
- '**/template/**/*'
|
||||||
|
|
||||||
|
runtime:
|
||||||
|
- '**/runtime/**/*'
|
||||||
|
- 'v2/internal/runtime/**/*'
|
||||||
|
- 'v3/internal/runtime/**/*'
|
||||||
|
|
||||||
|
bindings:
|
||||||
|
- 'v2/internal/binding/**/*'
|
||||||
|
- 'v3/internal/generator/**/*'
|
||||||
|
|
144
.github/issue-labeler.yml
vendored
Normal file
144
.github/issue-labeler.yml
vendored
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
# Version labels
|
||||||
|
v2-only:
|
||||||
|
- '\[v2\]'
|
||||||
|
- '\(v2\)'
|
||||||
|
- 'v2:'
|
||||||
|
- 'version 2'
|
||||||
|
- 'wails v2'
|
||||||
|
- 'using v2'
|
||||||
|
- 'master branch'
|
||||||
|
|
||||||
|
v3-alpha:
|
||||||
|
- '\[v3\]'
|
||||||
|
- '\(v3\)'
|
||||||
|
- 'v3:'
|
||||||
|
- '\[v3-alpha\]'
|
||||||
|
- '\(v3-alpha\)'
|
||||||
|
- 'version 3'
|
||||||
|
- 'wails v3'
|
||||||
|
- 'using v3'
|
||||||
|
- 'v3-alpha branch'
|
||||||
|
|
||||||
|
# Component labels
|
||||||
|
webview2:
|
||||||
|
- 'webview2'
|
||||||
|
- 'windows'
|
||||||
|
- 'microsoft edge'
|
||||||
|
- 'edge browser'
|
||||||
|
- 'IE'
|
||||||
|
- 'Explorer'
|
||||||
|
- 'browser crashes'
|
||||||
|
|
||||||
|
macos:
|
||||||
|
- 'macOS'
|
||||||
|
- 'mac OS'
|
||||||
|
- 'OS X'
|
||||||
|
- 'darwin'
|
||||||
|
- 'cocoa'
|
||||||
|
- 'Safari'
|
||||||
|
- 'Catalyst'
|
||||||
|
- 'Ventura'
|
||||||
|
- 'Sonoma'
|
||||||
|
- 'apple'
|
||||||
|
|
||||||
|
linux:
|
||||||
|
- 'linux'
|
||||||
|
- 'ubuntu'
|
||||||
|
- 'debian'
|
||||||
|
- 'fedora'
|
||||||
|
- 'gtk'
|
||||||
|
- 'webkitgtk'
|
||||||
|
- 'webkit2gtk'
|
||||||
|
- 'gnome'
|
||||||
|
- 'x11'
|
||||||
|
- 'wayland'
|
||||||
|
|
||||||
|
cli:
|
||||||
|
- 'cli'
|
||||||
|
- 'command line'
|
||||||
|
- 'wails doctor'
|
||||||
|
- 'wails init'
|
||||||
|
- 'wails build'
|
||||||
|
- 'wails dev'
|
||||||
|
- 'template'
|
||||||
|
- 'scaffolding'
|
||||||
|
|
||||||
|
# Type labels
|
||||||
|
bug:
|
||||||
|
- 'bug'
|
||||||
|
- 'crash'
|
||||||
|
- 'broken'
|
||||||
|
- 'failure'
|
||||||
|
- 'error'
|
||||||
|
- 'failed'
|
||||||
|
- 'panic'
|
||||||
|
- 'segfault'
|
||||||
|
- 'issue'
|
||||||
|
- 'not working'
|
||||||
|
- 'problem'
|
||||||
|
|
||||||
|
enhancement:
|
||||||
|
- 'feature'
|
||||||
|
- 'enhancement'
|
||||||
|
- 'request'
|
||||||
|
- 'add'
|
||||||
|
- 'new'
|
||||||
|
- 'improve'
|
||||||
|
- 'functionality'
|
||||||
|
- 'support for'
|
||||||
|
- 'please add'
|
||||||
|
- 'would be nice'
|
||||||
|
|
||||||
|
documentation:
|
||||||
|
- 'docs'
|
||||||
|
- 'documentation'
|
||||||
|
- 'readme'
|
||||||
|
- 'example'
|
||||||
|
- 'tutorial'
|
||||||
|
- 'guide'
|
||||||
|
- 'explanation'
|
||||||
|
- 'clarification'
|
||||||
|
- 'instructions'
|
||||||
|
|
||||||
|
security:
|
||||||
|
- 'security'
|
||||||
|
- 'vulnerability'
|
||||||
|
- 'exploit'
|
||||||
|
- 'hack'
|
||||||
|
- 'CVE'
|
||||||
|
- 'secure'
|
||||||
|
- 'encryption'
|
||||||
|
- 'hardening'
|
||||||
|
|
||||||
|
performance:
|
||||||
|
- 'performance'
|
||||||
|
- 'slow'
|
||||||
|
- 'speed'
|
||||||
|
- 'memory leak'
|
||||||
|
- 'cpu usage'
|
||||||
|
- 'high memory'
|
||||||
|
- 'lag'
|
||||||
|
- 'freeze'
|
||||||
|
- 'optimization'
|
||||||
|
|
||||||
|
# Priority labels
|
||||||
|
high-priority:
|
||||||
|
- 'urgent'
|
||||||
|
- 'critical'
|
||||||
|
- 'security'
|
||||||
|
- 'high priority'
|
||||||
|
- 'important'
|
||||||
|
- 'production'
|
||||||
|
- 'blocker'
|
||||||
|
- 'blocking'
|
||||||
|
|
||||||
|
question:
|
||||||
|
- 'how to'
|
||||||
|
- 'how do i'
|
||||||
|
- 'can I'
|
||||||
|
- 'is it possible'
|
||||||
|
- 'question'
|
||||||
|
- 'help me'
|
||||||
|
- 'need help'
|
||||||
|
- 'assistance'
|
||||||
|
- 'confused'
|
22
.github/stale.yml
vendored
22
.github/stale.yml
vendored
@ -1,7 +1,7 @@
|
|||||||
# Number of days of inactivity before an issue becomes stale
|
# Number of days of inactivity before an issue becomes stale
|
||||||
daysUntilStale: 30
|
daysUntilStale: 45
|
||||||
# Number of days of inactivity before a stale issue is closed
|
# Number of days of inactivity before a stale issue is closed
|
||||||
daysUntilClose: 7
|
daysUntilClose: 10
|
||||||
# Issues with these labels will never be considered stale
|
# Issues with these labels will never be considered stale
|
||||||
exemptLabels:
|
exemptLabels:
|
||||||
- pinned
|
- pinned
|
||||||
@ -9,14 +9,24 @@ exemptLabels:
|
|||||||
- onhold
|
- onhold
|
||||||
- inprogress
|
- inprogress
|
||||||
- "Selected For Development"
|
- "Selected For Development"
|
||||||
|
- bug
|
||||||
|
- enhancement
|
||||||
|
- v3-alpha
|
||||||
|
- high-priority
|
||||||
# Label to use when marking an issue as stale
|
# Label to use when marking an issue as stale
|
||||||
staleLabel: "Wont Fix"
|
staleLabel: "stale"
|
||||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
markComment: >
|
markComment: >
|
||||||
This issue has been automatically marked as stale because it has not had
|
This issue has been automatically marked as stale because it has not had
|
||||||
recent activity. It will be closed if no further activity occurs. Thank you
|
recent activity. It will be closed if no further activity occurs within the next 10 days.
|
||||||
for your contributions.
|
|
||||||
|
If this issue is still relevant, please add a comment to keep it open.
|
||||||
|
Thank you for your contributions.
|
||||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
closeComment: false
|
closeComment: >
|
||||||
|
This issue has been automatically closed due to lack of activity.
|
||||||
|
Please feel free to reopen it if it's still relevant.
|
||||||
exemptMilestones: true
|
exemptMilestones: true
|
||||||
exemptAssignees: true
|
exemptAssignees: true
|
||||||
|
# Only mark issues (not PRs)
|
||||||
|
only: issues
|
||||||
|
33
.github/workflows/auto-label-issues.yml
vendored
Normal file
33
.github/workflows/auto-label-issues.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Auto Label Issues
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened, edited, reopened]
|
||||||
|
pull_request:
|
||||||
|
types: [opened, edited, reopened, synchronize]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto-label:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Label issues and PRs by content
|
||||||
|
uses: github/issue-labeler@v3
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
configuration-path: .github/issue-labeler.yml
|
||||||
|
enable-versioned-regex: 0
|
||||||
|
include-title: 1
|
||||||
|
|
||||||
|
- name: Label issues and PRs by file paths
|
||||||
|
uses: actions/labeler@v4
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
configuration-path: .github/file-labeler.yml
|
||||||
|
sync-labels: true
|
77
.github/workflows/issue-triage-automation.yml
vendored
Normal file
77
.github/workflows/issue-triage-automation.yml
vendored
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
name: Issue Triage Automation
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened, reopened, labeled, unlabeled]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
triage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
# Request more info for unclear bug reports
|
||||||
|
- name: Request more info
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
if: |
|
||||||
|
contains(github.event.issue.labels.*.name, 'bug') &&
|
||||||
|
!contains(github.event.issue.body, 'wails doctor') &&
|
||||||
|
!contains(github.event.issue.body, 'reproduction')
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
github.rest.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: `👋 Thanks for reporting this issue! To help us investigate, could you please:
|
||||||
|
|
||||||
|
1. Add the output of \`wails doctor\` if not already included
|
||||||
|
2. Provide clear steps to reproduce the issue
|
||||||
|
3. If possible, create a minimal reproduction of the issue
|
||||||
|
|
||||||
|
This will help us resolve your issue much faster. Thank you!`
|
||||||
|
});
|
||||||
|
github.rest.issues.addLabels({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
labels: ['awaiting feedback']
|
||||||
|
});
|
||||||
|
|
||||||
|
# Prioritize security issues
|
||||||
|
- name: Prioritize security issues
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
if: contains(github.event.issue.labels.*.name, 'security')
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
github.rest.issues.addLabels({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
labels: ['high-priority']
|
||||||
|
});
|
||||||
|
|
||||||
|
# Tag version-specific issues for project boards
|
||||||
|
- name: Add to v2 project
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
if: |
|
||||||
|
contains(github.event.issue.labels.*.name, 'v2-only') &&
|
||||||
|
!contains(github.event.issue.labels.*.name, 'v3-alpha')
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
// Replace PROJECT_ID with your actual GitHub project ID
|
||||||
|
// This is a placeholder as the actual implementation would require
|
||||||
|
// GraphQL API calls to add to a project board
|
||||||
|
console.log('Would add to v2 project board');
|
||||||
|
|
||||||
|
# Tag version-specific issues for project boards
|
||||||
|
- name: Add to v3 project
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
if: contains(github.event.issue.labels.*.name, 'v3-alpha')
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
// Replace PROJECT_ID with your actual GitHub project ID
|
||||||
|
// This is a placeholder as the actual implementation would require
|
||||||
|
// GraphQL API calls to add to a project board
|
||||||
|
console.log('Would add to v3 project board');
|
123
scripts/AUTOMATION-README.md
Normal file
123
scripts/AUTOMATION-README.md
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
# Wails Issue Management Automation
|
||||||
|
|
||||||
|
This directory contains automation workflows and scripts to help manage the Wails project with minimal time investment.
|
||||||
|
|
||||||
|
## GitHub Workflow Files
|
||||||
|
|
||||||
|
### 1. Auto-Label Issues (`auto-label-issues.yml`)
|
||||||
|
- Automatically labels issues and PRs based on their content and modified files
|
||||||
|
- Labels are defined in `issue-labeler.yml` and `file-labeler.yml`
|
||||||
|
- Activates when issues are opened, edited, or reopened
|
||||||
|
|
||||||
|
### 2. Issue Triage Automation (`issue-triage-automation.yml`)
|
||||||
|
- Performs automated actions for issue triage
|
||||||
|
- Requests more info for incomplete bug reports
|
||||||
|
- Prioritizes security issues
|
||||||
|
- Adds issues to appropriate project boards
|
||||||
|
|
||||||
|
## Configuration Files
|
||||||
|
|
||||||
|
### 1. Issue Content Labeler (`issue-labeler.yml`)
|
||||||
|
- Defines patterns to match in issue title/body
|
||||||
|
- Categorizes by version (v2/v3), component, type, and priority
|
||||||
|
- Customize patterns as needed for your project
|
||||||
|
|
||||||
|
### 2. File Path Labeler (`file-labeler.yml`)
|
||||||
|
- Labels PRs based on which files they modify
|
||||||
|
- Helps identify which areas of the codebase are affected
|
||||||
|
- Customize file patterns as needed
|
||||||
|
|
||||||
|
### 3. Stale Issues Config (`stale.yml`)
|
||||||
|
- Marks issues as stale after 45 days of inactivity
|
||||||
|
- Closes stale issues after an additional 10 days
|
||||||
|
- Exempts issues with important labels
|
||||||
|
|
||||||
|
## Helper Scripts
|
||||||
|
|
||||||
|
### 1. Issue Triage Script (`scripts/issue-triage.ps1`)
|
||||||
|
- PowerShell script to quickly triage issues
|
||||||
|
- Lists recent issues needing attention
|
||||||
|
- Provides easy keyboard shortcuts for common actions
|
||||||
|
- Run during your dedicated issue triage time
|
||||||
|
|
||||||
|
### 2. PR Review Helper (`scripts/pr-review-helper.ps1`)
|
||||||
|
- PowerShell script to efficiently review PRs
|
||||||
|
- Generates review checklists
|
||||||
|
- Provides easy shortcuts for common review actions
|
||||||
|
- Run during your dedicated PR review time
|
||||||
|
|
||||||
|
## How to Use This System
|
||||||
|
|
||||||
|
### Daily Workflow (2 hours max)
|
||||||
|
|
||||||
|
**Monday (120 min):**
|
||||||
|
1. Run `scripts/issue-triage.ps1` (30 min)
|
||||||
|
2. Run `scripts/pr-review-helper.ps1` (30 min)
|
||||||
|
3. Check Discord for critical discussions (30 min)
|
||||||
|
4. Plan your week (30 min)
|
||||||
|
|
||||||
|
**Tuesday-Wednesday (120 min/day):**
|
||||||
|
1. Quick check for urgent issues (10 min)
|
||||||
|
2. v3 development (110 min)
|
||||||
|
|
||||||
|
**Thursday (120 min):**
|
||||||
|
1. v2 maintenance (90 min)
|
||||||
|
2. Documentation updates (30 min)
|
||||||
|
|
||||||
|
**Friday (120 min):**
|
||||||
|
1. Run `scripts/pr-review-helper.ps1` (60 min)
|
||||||
|
2. Discord updates/newsletter (30 min)
|
||||||
|
3. Weekly reflection (30 min)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. The GitHub workflow files should be placed in `.github/workflows/`
|
||||||
|
2. Configuration files should be placed in `.github/`
|
||||||
|
3. Helper scripts should be placed in `scripts/`
|
||||||
|
4. Make sure you have GitHub CLI (`gh`) installed and authenticated
|
||||||
|
|
||||||
|
## Customization
|
||||||
|
|
||||||
|
Feel free to modify the configuration files and scripts to better suit your project's needs:
|
||||||
|
|
||||||
|
1. **Adding New Label Categories**:
|
||||||
|
- Add new patterns to `issue-labeler.yml` for additional components or types
|
||||||
|
- Update `file-labeler.yml` if you add new directories or file types
|
||||||
|
|
||||||
|
2. **Adjusting Automation Thresholds**:
|
||||||
|
- Modify `stale.yml` to change how long issues remain active
|
||||||
|
- Update `issue-triage-automation.yml` to change conditions for automated actions
|
||||||
|
|
||||||
|
3. **Customizing Scripts**:
|
||||||
|
- Update the scripts with your specific GitHub username
|
||||||
|
- Add additional actions based on your workflow preferences
|
||||||
|
- Adjust time allocations based on which tasks need more attention
|
||||||
|
|
||||||
|
## Benefits
|
||||||
|
|
||||||
|
This automated issue management system will:
|
||||||
|
|
||||||
|
1. **Save Time**: Reduce manual triage of most common issues
|
||||||
|
2. **Improve Consistency**: Apply the same categorization rules every time
|
||||||
|
3. **Increase Visibility**: Clear categorization helps community members find issues
|
||||||
|
4. **Focus Development**: Clearer separation of v2 and v3 work
|
||||||
|
5. **Reduce Backlog**: Better management of stale issues
|
||||||
|
6. **Streamline Reviews**: Faster PR processing with guided workflows
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- GitHub CLI (`gh`) installed and authenticated
|
||||||
|
- PowerShell 5.1+ for Windows scripts
|
||||||
|
- GitHub Actions enabled on your repository
|
||||||
|
- Appropriate permissions to modify workflows
|
||||||
|
|
||||||
|
## Maintenance
|
||||||
|
|
||||||
|
This system requires minimal maintenance:
|
||||||
|
|
||||||
|
- Periodically review and update label patterns as your project evolves
|
||||||
|
- Adjust time allocations based on where you need to focus
|
||||||
|
- Update scripts if GitHub CLI commands change
|
||||||
|
- Customize the workflow as you find pain points in your process
|
||||||
|
|
||||||
|
Remember that the goal is to maximize your limited time (2 hours per day) by automating repetitive tasks and streamlining essential ones.
|
108
scripts/issue-triage.ps1
Normal file
108
scripts/issue-triage.ps1
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
# issue-triage.ps1 - Script to help with quick issue triage
|
||||||
|
# Run this at the start of your GitHub time to quickly process issues
|
||||||
|
|
||||||
|
# Set your GitHub username
|
||||||
|
$GITHUB_USERNAME = "your-username"
|
||||||
|
|
||||||
|
# Get the latest 10 open issues that aren't assigned and aren't labeled as "awaiting feedback"
|
||||||
|
Write-Host "Fetching recent unprocessed issues..."
|
||||||
|
gh issue list --repo wailsapp/wails --limit 10 --json number,title,labels,assignees | Out-File -Encoding utf8 -FilePath "issues_temp.json"
|
||||||
|
$issues = Get-Content -Raw -Path "issues_temp.json" | ConvertFrom-Json
|
||||||
|
$newIssues = $issues | Where-Object {
|
||||||
|
$_.assignees.Count -eq 0 -and
|
||||||
|
($_.labels.Count -eq 0 -or -not ($_.labels | Where-Object { $_.name -eq "awaiting feedback" }))
|
||||||
|
}
|
||||||
|
|
||||||
|
# Process each issue
|
||||||
|
Write-Host "`n===== Issues Needing Triage =====`n"
|
||||||
|
foreach ($issue in $newIssues) {
|
||||||
|
$number = $issue.number
|
||||||
|
$title = $issue.title
|
||||||
|
$labelNames = $issue.labels | ForEach-Object { $_.name }
|
||||||
|
$labelsStr = if ($labelNames) { $labelNames -join ", " } else { "none" }
|
||||||
|
|
||||||
|
Write-Host "Issue #$number`: $title"
|
||||||
|
Write-Host "Labels: $labelsStr`n"
|
||||||
|
|
||||||
|
$continue = $true
|
||||||
|
while ($continue) {
|
||||||
|
Write-Host "Options:"
|
||||||
|
Write-Host " [v] View issue in browser"
|
||||||
|
Write-Host " [2] Add v2-only label"
|
||||||
|
Write-Host " [3] Add v3-alpha label"
|
||||||
|
Write-Host " [b] Add bug label"
|
||||||
|
Write-Host " [e] Add enhancement label"
|
||||||
|
Write-Host " [d] Add documentation label"
|
||||||
|
Write-Host " [w] Add webview2 label"
|
||||||
|
Write-Host " [f] Request more info (awaiting feedback)"
|
||||||
|
Write-Host " [c] Close issue (duplicate/invalid)"
|
||||||
|
Write-Host " [a] Assign to yourself"
|
||||||
|
Write-Host " [s] Skip to next issue"
|
||||||
|
Write-Host " [q] Quit script"
|
||||||
|
$action = Read-Host "Enter action"
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
"v" {
|
||||||
|
gh issue view $number --repo wailsapp/wails --web
|
||||||
|
}
|
||||||
|
"2" {
|
||||||
|
Write-Host "Adding v2-only label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "v2-only"
|
||||||
|
}
|
||||||
|
"3" {
|
||||||
|
Write-Host "Adding v3-alpha label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "v3-alpha"
|
||||||
|
}
|
||||||
|
"b" {
|
||||||
|
Write-Host "Adding bug label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "Bug"
|
||||||
|
}
|
||||||
|
"e" {
|
||||||
|
Write-Host "Adding enhancement label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "Enhancement"
|
||||||
|
}
|
||||||
|
"d" {
|
||||||
|
Write-Host "Adding documentation label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "Documentation"
|
||||||
|
}
|
||||||
|
"w" {
|
||||||
|
Write-Host "Adding webview2 label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "webview2"
|
||||||
|
}
|
||||||
|
"f" {
|
||||||
|
Write-Host "Requesting more info..."
|
||||||
|
gh issue comment $number --repo wailsapp/wails --body "Thank you for reporting this issue. Could you please provide additional information to help us investigate?`n`n- [Specific details needed]`n`nThis will help us address your issue more effectively."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "awaiting feedback"
|
||||||
|
}
|
||||||
|
"c" {
|
||||||
|
$reason = Read-Host "Reason for closing (duplicate/invalid/etc)"
|
||||||
|
gh issue comment $number --repo wailsapp/wails --body "Closing this issue: $reason"
|
||||||
|
gh issue close $number --repo wailsapp/wails
|
||||||
|
}
|
||||||
|
"a" {
|
||||||
|
Write-Host "Assigning to yourself..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-assignee "$GITHUB_USERNAME"
|
||||||
|
}
|
||||||
|
"s" {
|
||||||
|
Write-Host "Skipping to next issue..."
|
||||||
|
$continue = $false
|
||||||
|
}
|
||||||
|
"q" {
|
||||||
|
Write-Host "Exiting script."
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
default {
|
||||||
|
Write-Host "Invalid option. Please try again."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "--------------------------------`n"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "No more issues to triage!"
|
||||||
|
|
||||||
|
# Clean up temp file
|
||||||
|
Remove-Item -Path "issues_temp.json"
|
103
scripts/issue-triage.sh
Normal file
103
scripts/issue-triage.sh
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# issue-triage.sh - Script to help with quick issue triage
|
||||||
|
# Run this at the start of your GitHub time to quickly process issues
|
||||||
|
|
||||||
|
# Set your GitHub username
|
||||||
|
GITHUB_USERNAME="your-username"
|
||||||
|
|
||||||
|
# Get the latest 10 open issues that aren't assigned and aren't labeled as "awaiting feedback"
|
||||||
|
echo "Fetching recent unprocessed issues..."
|
||||||
|
gh issue list --repo wailsapp/wails --limit 10 --json number,title,labels,assignees --jq '.[] | select(.assignees | length == 0) | select(any(.labels[]; .name != "awaiting feedback"))' > new_issues.json
|
||||||
|
|
||||||
|
# Process each issue
|
||||||
|
echo -e "\n===== Issues Needing Triage =====\n"
|
||||||
|
cat new_issues.json | jq -c '.[]' | while read -r issue; do
|
||||||
|
number=$(echo $issue | jq -r '.number')
|
||||||
|
title=$(echo $issue | jq -r '.title')
|
||||||
|
labels=$(echo $issue | jq -r '.labels[] | .name' 2>/dev/null | tr '\n' ', ' | sed 's/,$//')
|
||||||
|
|
||||||
|
if [ -z "$labels" ]; then
|
||||||
|
labels="none"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "Issue #$number: $title"
|
||||||
|
echo -e "Labels: $labels\n"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
echo "Options:"
|
||||||
|
echo " [v] View issue in browser"
|
||||||
|
echo " [2] Add v2-only label"
|
||||||
|
echo " [3] Add v3-alpha label"
|
||||||
|
echo " [b] Add bug label"
|
||||||
|
echo " [e] Add enhancement label"
|
||||||
|
echo " [d] Add documentation label"
|
||||||
|
echo " [w] Add webview2 label"
|
||||||
|
echo " [f] Request more info (awaiting feedback)"
|
||||||
|
echo " [c] Close issue (duplicate/invalid)"
|
||||||
|
echo " [a] Assign to yourself"
|
||||||
|
echo " [s] Skip to next issue"
|
||||||
|
echo " [q] Quit script"
|
||||||
|
read -p "Enter action: " action
|
||||||
|
|
||||||
|
case $action in
|
||||||
|
v)
|
||||||
|
gh issue view $number --repo wailsapp/wails --web
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
echo "Adding v2-only label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "v2-only"
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
echo "Adding v3-alpha label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "v3-alpha"
|
||||||
|
;;
|
||||||
|
b)
|
||||||
|
echo "Adding bug label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "Bug"
|
||||||
|
;;
|
||||||
|
e)
|
||||||
|
echo "Adding enhancement label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "Enhancement"
|
||||||
|
;;
|
||||||
|
d)
|
||||||
|
echo "Adding documentation label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "Documentation"
|
||||||
|
;;
|
||||||
|
w)
|
||||||
|
echo "Adding webview2 label..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "webview2"
|
||||||
|
;;
|
||||||
|
f)
|
||||||
|
echo "Requesting more info..."
|
||||||
|
gh issue comment $number --repo wailsapp/wails --body "Thank you for reporting this issue. Could you please provide additional information to help us investigate?\n\n- [Specific details needed]\n\nThis will help us address your issue more effectively."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-label "awaiting feedback"
|
||||||
|
;;
|
||||||
|
c)
|
||||||
|
read -p "Reason for closing (duplicate/invalid/etc): " reason
|
||||||
|
gh issue comment $number --repo wailsapp/wails --body "Closing this issue: $reason"
|
||||||
|
gh issue close $number --repo wailsapp/wails
|
||||||
|
;;
|
||||||
|
a)
|
||||||
|
echo "Assigning to yourself..."
|
||||||
|
gh issue edit $number --repo wailsapp/wails --add-assignee "$GITHUB_USERNAME"
|
||||||
|
;;
|
||||||
|
s)
|
||||||
|
echo "Skipping to next issue..."
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
q)
|
||||||
|
echo "Exiting script."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid option. Please try again."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "--------------------------------\n"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "No more issues to triage!"
|
152
scripts/pr-review-helper.ps1
Normal file
152
scripts/pr-review-helper.ps1
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
# pr-review-helper.ps1 - Script to help with efficient PR reviews
|
||||||
|
# Run this during your PR review time
|
||||||
|
|
||||||
|
# Set your GitHub username
|
||||||
|
$GITHUB_USERNAME = "your-username"
|
||||||
|
|
||||||
|
# Get open PRs that are ready for review
|
||||||
|
Write-Host "Fetching PRs ready for review..."
|
||||||
|
gh pr list --repo wailsapp/wails --json number,title,author,labels,reviewDecision,additions,deletions,baseRefName,headRefName --limit 10 | Out-File -Encoding utf8 -FilePath "prs_temp.json"
|
||||||
|
$prs = Get-Content -Raw -Path "prs_temp.json" | ConvertFrom-Json
|
||||||
|
|
||||||
|
# Process each PR
|
||||||
|
Write-Host "`n===== PRs Needing Review =====`n"
|
||||||
|
foreach ($pr in $prs) {
|
||||||
|
$number = $pr.number
|
||||||
|
$title = $pr.title
|
||||||
|
$author = $pr.author.login
|
||||||
|
$labels = if ($pr.labels) { $pr.labels | ForEach-Object { $_.name } | Join-String -Separator ", " } else { "none" }
|
||||||
|
$reviewState = if ($pr.reviewDecision) { $pr.reviewDecision } else { "PENDING" }
|
||||||
|
$baseRef = $pr.baseRefName
|
||||||
|
$headRef = $pr.headRefName
|
||||||
|
$changes = $pr.additions + $pr.deletions
|
||||||
|
|
||||||
|
Write-Host "PR #$number`: $title"
|
||||||
|
Write-Host "Author: $author"
|
||||||
|
Write-Host "Labels: $labels"
|
||||||
|
Write-Host "Branch: $headRef -> $baseRef"
|
||||||
|
Write-Host "Changes: +$($pr.additions)/-$($pr.deletions) lines"
|
||||||
|
Write-Host "Review state: $reviewState`n"
|
||||||
|
|
||||||
|
# Determine complexity based on size
|
||||||
|
$complexity = if ($changes -lt 50) {
|
||||||
|
"Quick review"
|
||||||
|
} elseif ($changes -lt 300) {
|
||||||
|
"Moderate review"
|
||||||
|
} else {
|
||||||
|
"Extensive review"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Complexity: $complexity"
|
||||||
|
|
||||||
|
$continue = $true
|
||||||
|
while ($continue) {
|
||||||
|
Write-Host "`nOptions:"
|
||||||
|
Write-Host " [v] View PR in browser"
|
||||||
|
Write-Host " [d] View diff in browser"
|
||||||
|
Write-Host " [c] Generate review checklist"
|
||||||
|
Write-Host " [a] Approve PR"
|
||||||
|
Write-Host " [r] Request changes"
|
||||||
|
Write-Host " [m] Add comment"
|
||||||
|
Write-Host " [l] Add labels"
|
||||||
|
Write-Host " [s] Skip to next PR"
|
||||||
|
Write-Host " [q] Quit script"
|
||||||
|
$action = Read-Host "Enter action"
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
"v" {
|
||||||
|
gh pr view $number --repo wailsapp/wails --web
|
||||||
|
}
|
||||||
|
"d" {
|
||||||
|
gh pr diff $number --repo wailsapp/wails --web
|
||||||
|
}
|
||||||
|
"c" {
|
||||||
|
# Generate review checklist
|
||||||
|
$checklist = @"
|
||||||
|
## PR Review: $title
|
||||||
|
|
||||||
|
### Basic Checks:
|
||||||
|
- [ ] PR title is descriptive
|
||||||
|
- [ ] PR description explains the changes
|
||||||
|
- [ ] Related issues are linked
|
||||||
|
|
||||||
|
### Technical Checks:
|
||||||
|
- [ ] Code follows project style
|
||||||
|
- [ ] No unnecessary commented code
|
||||||
|
- [ ] Error handling is appropriate
|
||||||
|
- [ ] Documentation updated (if needed)
|
||||||
|
- [ ] Tests included (if needed)
|
||||||
|
|
||||||
|
### Impact Assessment:
|
||||||
|
- [ ] Changes are backward compatible (if applicable)
|
||||||
|
- [ ] No breaking changes to public APIs
|
||||||
|
- [ ] Performance impact considered
|
||||||
|
|
||||||
|
### Version Specific:
|
||||||
|
"@
|
||||||
|
|
||||||
|
if ($baseRef -eq "master") {
|
||||||
|
$checklist += @"
|
||||||
|
|
||||||
|
- [ ] Appropriate for v2 maintenance
|
||||||
|
- [ ] No features that should be v3-only
|
||||||
|
"@
|
||||||
|
} elseif ($baseRef -eq "v3-alpha") {
|
||||||
|
$checklist += @"
|
||||||
|
|
||||||
|
- [ ] Appropriate for v3 development
|
||||||
|
- [ ] Aligns with v3 roadmap
|
||||||
|
"@
|
||||||
|
}
|
||||||
|
|
||||||
|
# Write to clipboard
|
||||||
|
$checklist | Set-Clipboard
|
||||||
|
Write-Host "`nReview checklist copied to clipboard!`n"
|
||||||
|
}
|
||||||
|
"a" {
|
||||||
|
$comment = Read-Host "Approval comment (blank for none)"
|
||||||
|
if ($comment) {
|
||||||
|
gh pr review $number --repo wailsapp/wails --approve --body $comment
|
||||||
|
} else {
|
||||||
|
gh pr review $number --repo wailsapp/wails --approve
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"r" {
|
||||||
|
$comment = Read-Host "Feedback for changes requested"
|
||||||
|
gh pr review $number --repo wailsapp/wails --request-changes --body $comment
|
||||||
|
}
|
||||||
|
"m" {
|
||||||
|
$comment = Read-Host "Comment text"
|
||||||
|
gh pr comment $number --repo wailsapp/wails --body $comment
|
||||||
|
}
|
||||||
|
"l" {
|
||||||
|
$labels = Read-Host "Labels to add (comma-separated)"
|
||||||
|
$labelArray = $labels -split ","
|
||||||
|
foreach ($label in $labelArray) {
|
||||||
|
$labelTrimmed = $label.Trim()
|
||||||
|
if ($labelTrimmed) {
|
||||||
|
gh pr edit $number --repo wailsapp/wails --add-label $labelTrimmed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"s" {
|
||||||
|
Write-Host "Skipping to next PR..."
|
||||||
|
$continue = $false
|
||||||
|
}
|
||||||
|
"q" {
|
||||||
|
Write-Host "Exiting script."
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
default {
|
||||||
|
Write-Host "Invalid option. Please try again."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "--------------------------------`n"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "No more PRs to review!"
|
||||||
|
|
||||||
|
# Clean up temp file
|
||||||
|
Remove-Item -Path "prs_temp.json"
|
Loading…
Reference in New Issue
Block a user