Skip to content

Skip processing of pull requests completely without log output when onlyIssueTypes is set.#1336

Open
chiranjib-swain wants to merge 3 commits intoactions:mainfrom
chiranjib-swain:feature/issue-type-filtering
Open

Skip processing of pull requests completely without log output when onlyIssueTypes is set.#1336
chiranjib-swain wants to merge 3 commits intoactions:mainfrom
chiranjib-swain:feature/issue-type-filtering

Conversation

@chiranjib-swain
Copy link
Copy Markdown
Contributor

@chiranjib-swain chiranjib-swain commented May 6, 2026

Description:

This PR improves handling of the onlyIssueTypes option by silently skipping pull requests when the option is set, without generating log output.

Changes

  • Updated IssuesProcessor logic to skip PRs silently when onlyIssueTypes is configured
  • Added tests to verify:
    • only allowed issue types are processed
    • PRs are skipped without log output
    • issues and PRs are both processed when onlyIssueTypes is unset
  • Added @actions/core import in tests for logging spies

Related issue:
(#1331)

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@chiranjib-swain chiranjib-swain self-assigned this May 6, 2026
Copilot AI review requested due to automatic review settings May 6, 2026 10:52
@chiranjib-swain chiranjib-swain requested a review from a team as a code owner May 6, 2026 10:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the onlyIssueTypes behavior so that when it’s configured, pull requests are skipped entirely (and without per-PR log output), while issues are still filtered by their allowed issue types.

Changes:

  • Added an early guard in IssuesProcessor.processIssues to silently continue on PRs when onlyIssueTypes is set.
  • Updated the compiled dist bundle to include the same behavior.
  • Expanded only-issue-types tests to cover PR skipping (no log mentions) and to confirm PRs are processed when onlyIssueTypes is unset.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/classes/issues-processor.ts Adds an early skip for PRs when onlyIssueTypes is configured to avoid PR processing/logging.
dist/index.js Compiled output reflecting the same PR-skip logic.
__tests__/only-issue-types.spec.ts Adds test coverage for PR skipping without log mentions and for processing PRs when the option is unset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread __tests__/only-issue-types.spec.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants