quarkusio / quarkus-github-bot

A Quarkus-powered GitHub App to simplify issues and pull requests management in the Quarkus project.
Apache License 2.0
23 stars 25 forks source link

Maintainers are not cc to an issue or a pullRequest when they are already participants #295

Closed nicolasgras closed 1 year ago

nicolasgras commented 1 year ago

This pull request resolves #143.

Before cc maintainers to an issue or a pull request, participants of it are queried with Github GraphQL Api and are removed of list of maintainers that are notified.

The GraphQL request body is:

query($owner: String! $repoName: String! $prNumber: Int!) {
  repository(owner: $owner, name: $repoName) {
    $objectType(number: $number) {
      participants(first: 50) {
        edges {
          node {
            login
          }
        }
      }
    }
  }
}

where $objectType is replaced by issue or pullRequest according to the situation.

nicolasgras commented 1 year ago

You're welcome!

gsmet commented 1 year ago

I had to do some rather involved surgery when rebasing on top of https://github.com/quarkusio/quarkus-github-bot/pull/299 .

Could you check it still makes sense to you? I refactored things a bit to fit with the new Mentions object but I think it should be good enough.

gsmet commented 1 year ago

While doing that, I also saw that we missed a few places to use the new Mentions pattern so I cleaned things up in all places.

nicolasgras commented 1 year ago

Thank you for having updated the branch. Yes, it still makes sense for me.

gsmet commented 1 year ago

Thanks for checking, I merged it!