vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Add auto-refresh configuration for pull requests queries

Open Copilot opened this issue 2 months ago • 0 comments

Adds githubPullRequests.queries.refreshInterval setting to automatically refresh pull request queries at a specified interval (in minutes). Setting to 0 disables auto-refresh.

Changes

  • Configuration (package.json, package.nls.json)

    • New setting: githubPullRequests.queries.refreshInterval (number, default: 0)
    • Minimum enforced interval: 5 minutes to prevent excessive API calls
  • Implementation (src/view/prsTreeDataProvider.ts)

    • Timer lifecycle management with configuration change listener
    • Automatic cleanup on disposal
    • Reuses existing refreshAllQueryResults() with cache clearing
// Example usage in VS Code settings:
{
  "githubPullRequests.queries.refreshInterval": 10  // Refresh every 10 minutes
}

Setting values less than 5 are clamped to the 5-minute minimum. The timer respects configuration changes immediately without requiring restart.

Original prompt

This section details on the original issue you should resolve

<issue_title>Allow auto refresh of the pull requests</issue_title> <issue_description>Please add a new configuration option to automatically refresh the queries in the pull requests section, so there is no need to refresh them manually.

This configuration option should be a number: 0 means no auto-refresh, while a positive value is the refresh rate. </issue_description>

<agent_instructions>Add the pull requests view refresh frequency setting for a number of minutes. Don't allow it to be less than 5 minutes. </agent_instructions>

Comments on the Issue (you are @copilot in this section)

  • Fixes microsoft/vscode-pull-request-github#6129

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Dec 10 '25 11:12 Copilot