Repository: atlassian/changesets
Pull request #229 (2019-12-16 11:19:26)

Fix the author of a PR not being queried in get-github-info
...And this is why I don't like mocking things but anyway, somehow I didn't query for the PR author in #224 but I had responses in the tests that included it ¯\\\_(ツ)_/¯


changeset-bot[bot]: ###  🦋  Changeset is good to go

Latest commit: 4cc50e9cdef45b8559f8ce424f03ac03d1604404

**We got this.**

Not sure what this means? [Click here  to learn what changesets are](https://github.com/Noviny/changesets/blob/master/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/atlassian/changesets/new/fix-author-of-pr-not-being-fetched?filename=.changeset/odd-seals-tan.md)


codecov[bot]: # [Codecov](https://codecov.io/gh/atlassian/changesets/pull/229?src=pr&el=h1) Report
> Merging [#229](https://codecov.io/gh/atlassian/changesets/pull/229?src=pr&el=desc) into [master](https://codecov.io/gh/atlassian/changesets/commit/56e23f42055d812f0bafb2138615475ea16b5025?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/atlassian/changesets/pull/229/graphs/tree.svg?width=650&token=j0W25zrXm2&height=150&src=pr)](https://codecov.io/gh/atlassian/changesets/pull/229?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #229   +/-   ##
=======================================
  Coverage   81.53%   81.53%           
=======================================
  Files          44       44           
  Lines        1186     1186           
  Branches      267      267           
=======================================
  Hits          967      967           
  Misses        209      209           
  Partials       10       10
```


| [Impacted Files](https://codecov.io/gh/atlassian/changesets/pull/229?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [packages/get-github-info/src/index.ts](https://codecov.io/gh/atlassian/changesets/pull/229/diff?src=pr&el=tree#diff-cGFja2FnZXMvZ2V0LWdpdGh1Yi1pbmZvL3NyYy9pbmRleC50cw==) | `80.85% <ø> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/atlassian/changesets/pull/229?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/atlassian/changesets/pull/229?src=pr&el=footer). Last update [56e23f4...4cc50e9](https://codecov.io/gh/atlassian/changesets/pull/229?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/.changeset/sixty-turkeys-cover.md b/.changeset/sixty-turkeys-cover.md
new file mode 100644
index 0000000..1544d70
--- /dev/null
+++ b/.changeset/sixty-turkeys-cover.md
@@ -0,0 +1,6 @@
+---
+"@changesets/get-github-info": patch
+"@changesets/changelog-github": patch
+---
+
+Fix the author of a PR not being queried
diff --git a/packages/get-github-info/src/index.ts b/packages/get-github-info/src/index.ts
index 519ba23..8ddd918 100644
--- a/packages/get-github-info/src/index.ts
+++ b/packages/get-github-info/src/index.ts
@@ -26,6 +26,12 @@ function makeQuery(repos: any) {
                 number
                 url
                 mergedAt
+                author {
+                  user {
+                    login
+                    url
+                  }
+                }
               }
             }
             author {


Test patch:
diff --git a/packages/get-github-info/src/index.test.ts b/packages/get-github-info/src/index.test.ts
index 5bb7139..6c3b288 100644
--- a/packages/get-github-info/src/index.test.ts
+++ b/packages/get-github-info/src/index.test.ts
@@ -21,6 +21,12 @@ test("associated with multiple PRs with only one merged", async () => {
                     number
                     url
                     mergedAt
+                    author {
+                      user {
+                        login
+                        url
+                      }
+                    }
                   }
                 }
                 author {
@@ -124,6 +130,12 @@ test("associated with multiple PRs with multiple merged gets the one that was me
                     number
                     url
                     mergedAt
+                    author {
+                      user {
+                        login
+                        url
+                      }
+                    }
                   }
                 }
                 author {
@@ -227,6 +239,12 @@ test("gets the author of the associated pull request if it exists rather than th
                     number
                     url
                     mergedAt
+                    author {
+                      user {
+                        login
+                        url
+                      }
+                    }
                   }
                 }
                 author {