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

Add PR/MR author info #86

Merged
merged 1 commit into from
Apr 3, 2019
Merged

Add PR/MR author info #86

merged 1 commit into from
Apr 3, 2019

Conversation

simonmarton
Copy link
Contributor

@simonmarton simonmarton commented Apr 1, 2019

New Pull Request Checklist

  • Run go fmt on your files (e.g. go fmt ./service/common.go, or on the whole service folder: go fmt ./service/...)
  • Write tests for your code
    • The tests should cover both "success" and "error" cases.
    • The tests should also check all the returned variables, don't ignore any returned value!
    • Ideally the tests should be easily readable, we usually use tests to document our code instead of code comments.
      An example, if you'd write a comment like "Given X this function will return Y" or
      "Beware, if the input is X this function will return Y" then you should implement this as
      a unit test, instead of writing it as a comment.
  • If your Pull Request is more than a bug fix you should also check README.md and change/add the descriptions there - also
    feel free to add yourself as a contributor if you implement support for a new service ;)
  • Before creating the Pull Request you should also run bitrise run test with the Bitrise CLI,
    to perform all the automatic checks (which will run on your Pull Request when you open it).

Summary of Pull Request

Consume Author name for GitHub, GitLab and Bitbucker hooks

Copy link
Contributor

@slapec93 slapec93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👌 ✅

@simonmarton simonmarton merged commit ac070da into master Apr 3, 2019
@simonmarton simonmarton deleted the feat/add-author-info branch April 3, 2019 10:57
@mjholgate
Copy link

Hi guys, we think this has broken our bitbucket webhooks. We get the following response:

"error": "Failed to transform the webhook: Failed to parse request body as JSON: json: cannot unmarshal object into Go struct field PullRequestInfoModel.author of type string"

Any ideas?

@nhammond101
Copy link

nhammond101 commented Apr 3, 2019

Looks like the issue on bitbucket is the author isn't a string but a json object:

"author": {
  "username": "nhammond101",
  ...
}

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.

4 participants