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

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

@jamesmeneghello

Description

@jamesmeneghello

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions