diff --git a/.github/workflows/lint-jobs.yml b/.github/workflows/lint-jobs.yml index 11ba3eb9..046cb1cc 100644 --- a/.github/workflows/lint-jobs.yml +++ b/.github/workflows/lint-jobs.yml @@ -44,7 +44,7 @@ jobs: - name: Install required collections and roles run: ansible-galaxy install -r ./deploy/ansible/requirements.yml --force - name: Run ansible-lint - uses: ansible/ansible-lint@main + uses: ansible/ansible-lint@v6 with: working-directory: deploy shellcheck: diff --git a/gobot/handlers/pull_request.go b/gobot/handlers/pull_request.go index 28b54c4d..623e0987 100644 --- a/gobot/handlers/pull_request.go +++ b/gobot/handlers/pull_request.go @@ -36,10 +36,12 @@ func (h *PullRequestHandler) Handle(ctx context.Context, eventType, deliveryID s return nil } - if event.GetAction() != "labeled" { + if event.GetPullRequest().GetState() != "open" || event.GetAction() != "labeled" { return nil } + h.Logger.Debugf("Received pull request event: %v", event) + installID := githubapp.GetInstallationIDFromEvent(&event) repo := event.GetRepo() repoOwner := repo.GetOwner().GetLogin()