Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let Github bots events trigger changes in Jira #403

Closed
wants to merge 1 commit into from

Conversation

mat007
Copy link

@mat007 mat007 commented Nov 13, 2020

With Github pushing for using Github Apps and Actions instead of bot users this will only become more common to have user type «Bot» triggering webhooks.
I don’t see why there should be a difference when a bot or a real user makes some changes on Github that should be reflected in Jira.

Fixes #394

With Github pushing for using Github Apps and Actions instead of bot users this will only become more common to have user type «Bot» triggering webhooks.
I don’t see why there should be a difference when a bot or a real user makes some changes on Github that should be reflected in Jira.

Fixes atlassian#394
@mat007 mat007 requested a review from a team as a code owner November 13, 2020 10:37
@tebriel
Copy link
Contributor

tebriel commented Nov 13, 2020

Hi @mat007 Thanks for this submission. The reason this protection exists is to avoid bot feedback loops where two bots are triggering off each others events, causing a cascade of webhooks. Such as the following (admittedly contrived) example:

  1. User submits a PR with a link to a Jira Issue
  2. Jira Integration receives the PR webhook, updates the PR Text to replace the JIRA issue ID as a link to the Jira Issue
  3. Bot 2 receives a PR Update Webhook, Updates the Issue removing the link and reformatting the Jira Issue ID for some other purpose
  4. Goto 2

We've had multiple internal discussions about ways to work around this, but currently we have not settled on a solution.

@mat007
Copy link
Author

mat007 commented Nov 14, 2020

Thanks for providing some context @tebriel, I understand your concern.
It’s not easy to prevent loops without storing state, is the integration entirely stateless?

However it seriously limits automation as it is now.
Maybe this could be an option that could be opted out?

@tebriel
Copy link
Contributor

tebriel commented Nov 16, 2020

The integration is not entirely stateless, no. I think that allowing a user to opt out of this would potentially allow them to use bot automations, but would still open up the potential for a feedback loop. The Jira integration is going through an ownership transfer within GitHub at the moment, I'm hoping the new team will be ready soon to look at issues such as this one.

@atrigueiro
Copy link
Contributor

Closing this PR in favour of #437

@atrigueiro atrigueiro closed this May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PRs not displaying in Jira
3 participants