Repository: atlassian/changesets
Pull request #257 (2020-01-24 00:19:07)

small changes
@Andarist or @mitchellhamilton - some small changes that should be merged before we release (the GH graphql one blocks releasing)

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

Latest commit: 3d388f7d7e5d7b1897c628cb1763a8263c76e2fb

**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/noviny/fix-github-query?filename=.changeset/shaggy-cobras-invent.md)


codecov[bot]: # [Codecov](https://codecov.io/gh/atlassian/changesets/pull/257?src=pr&el=h1) Report
> Merging [#257](https://codecov.io/gh/atlassian/changesets/pull/257?src=pr&el=desc) into [master](https://codecov.io/gh/atlassian/changesets/commit/4af2a78b22a2d22b557fe21603c83cc99959773d?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master     #257      +/-   ##
==========================================
- Coverage   81.18%   81.16%   -0.02%     
==========================================
  Files          44       44              
  Lines        1201     1200       -1     
  Branches      276      272       -4     
==========================================
- Hits          975      974       -1     
  Misses        216      216              
  Partials       10       10
```


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

------

[Continue to review full report at Codecov](https://codecov.io/gh/atlassian/changesets/pull/257?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/257?src=pr&el=footer). Last update [4af2a78...e32b8ec](https://codecov.io/gh/atlassian/changesets/pull/257?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/.changeset/cool-needles-hear.md b/.changeset/cool-needles-hear.md
new file mode 100644
index 0000000..877f830
--- /dev/null
+++ b/.changeset/cool-needles-hear.md
@@ -0,0 +1,5 @@
+---
+"@changesets/get-github-info": patch
+---
+
+Modify the Author query to match github's changes to their graphql
diff --git a/.changeset/wet-panthers-sort.md b/.changeset/wet-panthers-sort.md
new file mode 100644
index 0000000..06686d8
--- /dev/null
+++ b/.changeset/wet-panthers-sort.md
@@ -0,0 +1,5 @@
+---
+"@changesets/apply-release-plan": patch
+---
+
+Move catch statement so errors are less spammy
diff --git a/packages/apply-release-plan/src/index.ts b/packages/apply-release-plan/src/index.ts
index d257468..0f075bd 100644
--- a/packages/apply-release-plan/src/index.ts
+++ b/packages/apply-release-plan/src/index.ts
@@ -196,30 +196,28 @@ async function getNewChangelogEntry(
 
   return Promise.all(
     releaseWithWorkspaces.map(async release => {
-      try {
-        let changelog = await getChangelogEntry(
-          release,
-          releaseWithWorkspaces,
-          moddedChangesets,
-          getChangelogFuncs,
-          changelogOpts
-        );
-
-        return {
-          ...release,
-          changelog
-        };
-      } catch (e) {
-        console.error(
-          "The following error was encountered while generating changelog entries"
-        );
-        console.error(
-          "We have escaped applying the changesets, and no files should have been affected"
-        );
-        throw e;
-      }
+      let changelog = await getChangelogEntry(
+        release,
+        releaseWithWorkspaces,
+        moddedChangesets,
+        getChangelogFuncs,
+        changelogOpts
+      );
+
+      return {
+        ...release,
+        changelog
+      };
     })
-  );
+  ).catch(e => {
+    console.error(
+      "The following error was encountered while generating changelog entries"
+    );
+    console.error(
+      "We have escaped applying the changesets, and no files should have been affected"
+    );
+    throw e;
+  });
 }
 
 async function updateChangelog(
diff --git a/packages/get-github-info/src/index.ts b/packages/get-github-info/src/index.ts
index 8ddd918..1eb0651 100644
--- a/packages/get-github-info/src/index.ts
+++ b/packages/get-github-info/src/index.ts
@@ -27,10 +27,8 @@ function makeQuery(repos: any) {
                 url
                 mergedAt
                 author {
-                  user {
-                    login
-                    url
-                  }
+                  login
+                  url
                 }
               }
             }


Test patch:
diff --git a/packages/get-github-info/src/index.test.ts b/packages/get-github-info/src/index.test.ts
index 6c3b288..cf4d28b 100644
--- a/packages/get-github-info/src/index.test.ts
+++ b/packages/get-github-info/src/index.test.ts
@@ -22,10 +22,8 @@ test("associated with multiple PRs with only one merged", async () => {
                     url
                     mergedAt
                     author {
-                      user {
-                        login
-                        url
-                      }
+                      login
+                      url
                     }
                   }
                 }
@@ -131,10 +129,8 @@ test("associated with multiple PRs with multiple merged gets the one that was me
                     url
                     mergedAt
                     author {
-                      user {
-                        login
-                        url
-                      }
+                      login
+                      url
                     }
                   }
                 }
@@ -240,10 +236,8 @@ test("gets the author of the associated pull request if it exists rather than th
                     url
                     mergedAt
                     author {
-                      user {
-                        login
-                        url
-                      }
+                      login
+                      url
                     }
                   }
                 }