Skip to content

Commit

Permalink
Do not post bot welcome message on label change if the PR is closed
Browse files Browse the repository at this point in the history
Signed-off-by: Anil Vishnoi <[email protected]>
  • Loading branch information
vishnoianil committed May 7, 2024
1 parent c39aa54 commit 589583c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion gobot/handlers/pull_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 589583c

Please sign in to comment.