Skip to content

Commit

Permalink
Merge pull request #336 from vishnoianil/issue-335
Browse files Browse the repository at this point in the history
Do not post bot welcome message on label change if the PR is closed
  • Loading branch information
nerdalert authored May 7, 2024
2 parents a7c95d3 + 589583c commit 290096f
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 290096f

Please sign in to comment.