Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

[GitHub] Webhooks / status labels don't work with PRs #197

Open
jamesmeneghello opened this issue Feb 13, 2020 · 0 comments
Open

[GitHub] Webhooks / status labels don't work with PRs #197

jamesmeneghello opened this issue Feb 13, 2020 · 0 comments

Comments

@jamesmeneghello
Copy link

Our current workflow looks like this:

  1. Feature in Aha!
  2. Send feature to GitHub as an issue
  3. Engineers take GitHub issues and convert to a PR (using hub pull-request -i)
  4. Feature state is synced with status label so as it goes through inprog/awaiting review/merged the feature in Aha! gets updated.

The problem comes when the issue is converted to a PR - because GitHub then starts sending pull_request webhooks, Aha!'s integration drops the payload. However, a GitHub PR is a child of an issue - you can use them virtually interchangeably. The problem is caused by this line, which drops the payload if issue isn't present - in a PR it's called pull_request. Changing this line to something like action, issue, repo = payload.webhook.action, payload.webhook.issue or payload.webhook.pull_request, payload.webhook.repository should allow it to be used with both.

Currently we're working around this process by having GitHub send the webhooks to a bot, which is rewriting that one payload key to issue, and sending it on to the correct product in Aha! - but it'd be nice to not have to do this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant