Skip to content

Why is the action limited to pull_request: [opened, reopened]? #648

@rajyan

Description

@rajyan

Currently the Codium-ai/pr-agent Github Action runs pr-agent on pull_request: [opened, reopened]

https://github.com/Codium-ai/pr-agent/blob/e4f177908b620e46740b03966fda9243473d979e/pr_agent/servers/github_action_runner.py#L82

I think it is a sensible default (running pr-agent in 'synchronize' would get flooded), but there are lot of use cases that are reasonable to run pr-agent in 'synchronize' or 'ready_for_review'.

For example

  • Run when 'ready_for_review' for draft pull requests instead of opened, because in most cases /review, /describe or /improve for draft pull requests are useless
  • Run pr-agent on 'synchronize' when labeled with a specific label

Simply put, we want to have control over when the PR agent runs according to our own conditions.

Is it possible to change this line into a config? or are there any reasons that the event is restricted to [opened, reopened]?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions