Skip to main content
The PR feature analyzes your current branch, commits, linked tickets, and code diffs to automatically generate well-structured pull request descriptions that follow your team’s conventions.

Quick Start

Generate a PR description for your current branch:
devdaily pr
Create a PR directly on GitHub:
devdaily pr --create

How It Works

1

Analyze Branch

DevDaily examines your current branch, comparing it to the base branch to identify all commits and changes.
2

Extract Context

Collects ticket IDs from branch names and commit messages, fetches ticket details, and analyzes code diffs.
3

Apply Template

If a PR template exists (.github/PULL_REQUEST_TEMPLATE.md), it structures the content accordingly.
4

AI Generation

Uses GitHub Copilot CLI to generate a comprehensive description following your team’s guidelines.
5

Interactive Actions

Choose to copy to clipboard, create PR on GitHub, or preview in browser.

Command Options

Basic Options

OptionDescriptionDefault
-b, --base <branch>Base branch to compare againstAuto-detected or main
-c, --createCreate PR on GitHub immediatelyfalse
-d, --draftCreate as draft PRfalse
-p, --previewShow preview before creatingfalse
# Compare against develop branch
devdaily pr --base develop

# Create draft PR
devdaily pr --draft

# Preview before creating
devdaily pr --create --preview

Context Control

OptionDescription
-t, --ticket <id>Include specific ticket/issue for context
--no-ticketsSkip fetching ticket context
--no-templateIgnore PR template, use default format
--no-diffSkip including diff context in AI prompt
--no-prompt-fileIgnore custom PR prompt file
# Include specific ticket
devdaily pr --ticket PROJ-456

# Skip ticket lookup
devdaily pr --no-tickets

Interactive Mode

OptionDescription
-i, --interactiveInteractive mode for labels, reviewers, assignees
devdaily pr --interactive
Interactive mode fetches repository metadata and allows you to select:
  • Labels to apply to the PR
  • Reviewers to request
  • Assignees for the PR

Clipboard and Journal

OptionDescription
--no-copyDon’t copy to clipboard
--no-journalSkip auto-saving snapshot to journal
--debugShow debug information (prompts, raw AI input)
# Skip clipboard copy
devdaily pr --no-copy

# Debug mode
devdaily pr --debug

PR Templates

DevDaily automatically detects and uses PR templates from your repository:

Supported Template Locations

  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/pull_request_template.md
  • PULL_REQUEST_TEMPLATE.md
  • docs/PULL_REQUEST_TEMPLATE.md

Template Sections

The AI recognizes common template sections and fills them appropriately:
  • Description: Summary of changes
  • Type: Feature, bugfix, refactor, etc.
  • Impact: Affected areas and potential risks
  • Testing: How changes were tested
  • Breaking Changes: Any breaking changes introduced
  • Additional Info: Context, screenshots, notes
DevDaily parses templates with headers like ## Description, ## Testing, etc., and structures the AI output to match.

Custom PR Guidelines

You can provide team-specific PR writing guidelines:

Create a PR Prompt File

Add .devdaily/pr-prompt.md to your repository:
# PR Description Guidelines

## Style
- Use present tense ("Add feature" not "Added feature")
- Keep descriptions concise but complete
- Reference ticket IDs in format: PROJ-123

## Structure
1. Start with a one-line summary
2. Explain the "why" before the "what"
3. List breaking changes prominently
4. Include testing steps

## Examples
See our wiki for PR description examples.
DevDaily will include these guidelines when generating descriptions.

What Gets Analyzed

Branch Information

  • Current branch name
  • Base branch for comparison
  • Branch creation point

Commits

  • All commit messages on the branch
  • Commit hashes and authors
  • Commit timestamps

Code Changes

  • Files changed
  • Diff statistics (insertions/deletions)
  • Code diff content (configurable limit)

Tickets & Issues

  • Ticket IDs extracted from:
    • Branch name (e.g., feature/PROJ-123-login)
    • Commit messages
    • Manual --ticket flag
  • Ticket details from your PM tool:
    • Title and description
    • Status and priority
    • Type (bug, feature, task)

PR Title Generation

The AI generates PR titles following conventional commit style:
  • feat: Add user authentication
  • fix: Resolve login redirect issue
  • refactor: Simplify auth flow
  • docs: Update API documentation
DevDaily analyzes commit messages to determine PR type:
  • feature: New features (feat:, feature:)
  • fix: Bug fixes (fix:, bugfix:)
  • refactor: Code refactoring (refactor:)
  • docs: Documentation (docs:)
  • test: Tests (test:)
  • chore: Maintenance (chore:)

Interactive Actions

After generating a PR description, you can:
  1. Copy to clipboard - For manual PR creation
  2. Create PR on GitHub - Direct GitHub integration
  3. Create draft PR - Mark as work-in-progress
  4. Preview in browser - Open GitHub compare view
  5. Configure labels & reviewers - Interactive metadata selection

Example Workflows

Basic PR Creation

# Generate description
devdaily pr

# Choose "Create PR on GitHub" from menu

Draft PR with Preview

devdaily pr --draft --preview

Interactive with Labels

# Full interactive mode
devdaily pr --interactive

# Select labels, reviewers, and assignees
# Then create PR

Custom Base Branch

# Compare against develop
devdaily pr --base develop --create

Quick Copy to Clipboard

# Generate and copy
devdaily pr

# Choose "Copy to clipboard" from menu

Output Preview

When using --preview or --interactive, you’ll see:
┌─────────────────────────────────────────────┐
│ PR Preview                                   │
├─────────────────────────────────────────────┤

│  ⬤ feat: Add user authentication system

│  feature/PROJ-123-auth → main
│  🏷️  enhancement  feature
│  👤 Assignees: username
│  👁️  Reviewers: reviewer1, reviewer2

├─────────────────────────────────────────────┤
│  ## Description
│  Implements OAuth2 authentication flow...

│  ## Testing
│  - Unit tests added for auth service
│  - Manual testing completed
└─────────────────────────────────────────────┘

GitHub Integration

Requires gh CLI authenticated with GitHub

Create PR Directly

devdaily pr --create
This will:
  1. Push your branch to remote if needed
  2. Create the PR on GitHub
  3. Apply labels if selected
  4. Request reviewers if selected
  5. Assign the PR if specified
  6. Return the PR URL

Preview in Browser

Open GitHub’s compare view without creating a PR:
devdaily pr
# Select "Preview in browser" from menu

Configuration

Customize PR generation in .devdaily.json:
{
  "pr": {
    "defaultBase": "main",
    "includeDiff": true,
    "maxDiffLines": 200
  },
  "output": {
    "showStats": true,
    "copyToClipboard": true
  }
}

Configuration Options

OptionDescriptionDefault
pr.defaultBaseDefault base branch"main"
pr.includeDiffInclude diff in AI prompttrue
pr.maxDiffLinesMax diff lines to include200
If diff is too large, it’s automatically truncated to fit the AI context window.

Troubleshooting

You cannot create a PR from the base branch itself.
# Switch to a feature branch first
git checkout -b feature/your-feature
Ensure you have commits on your branch:
git log
If empty, make some commits first.
Install GitHub Copilot CLI:
brew install copilot-cli
# or
gh extension install github/gh-copilot
Ensure gh CLI is authenticated:
gh auth status
gh auth login