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

PRs not displaying in Jira #394

Closed
nterbogt opened this issue Oct 13, 2020 · 3 comments
Closed

PRs not displaying in Jira #394

nterbogt opened this issue Oct 13, 2020 · 3 comments
Labels
bug Something isn't working P1

Comments

@nterbogt
Copy link

Came across an issue where a PR wouldn't display in Jira.

The PR was created with the github-actions bot as the author and wouldn't be detected. If a real user commented on the PR, it would show up. If a real user changed the status, it would show up. etc etc.

Changing the author of the PR to a real user fixed the issue. We did this by not using ${{ secrets.GITHUB_TOKEN }} in the action and changing that to a custom token for a real user.

It should really just work... however and whoever creates the PR.

@mat007
Copy link

mat007 commented Nov 13, 2020

I think I just hit the same issue.
Here is probably the cause for this:

    if (context.payload.sender.type === 'Bot') {
      context.log({ noop: 'bot', botId: context.payload.sender.id, botLogin: context.payload.sender.login }, 'Halting futher execution since the sender is a bot');
      return;
    }

That’s in https://github.com/integrations/jira/blob/master/lib/github/middleware.js#L63

I don’t understand why a bot should be handled differently than a regular user?

mat007 added a commit to mat007/jira that referenced this issue 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 atlassian#394
@VolodymyrFesenko
Copy link

This also results in a PR status update not being reported back to Jira if Bot merges the PR. Jira shows the linked PR as open even though it has been merged.

@atrigueiro
Copy link
Contributor

atrigueiro commented May 14, 2021

Hi all,

We've fixed this bug and it's out in prod! #437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants