@jsenv/github-pull-request-impact 1.6.9 → 1.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,4 +10,4 @@ This repository publishes `@jsenv/github-pull-request-impact` on NPM. This packa
10
10
 
11
11
  - [@jsenv/performance-impact](../jsenv-performance-impact)
12
12
  - [@jsenv/file-size-impact](../jsenv-file-size-impact)
13
- - [@jsenv/lighthouse-score-impact](../jsenv-performance-impact)
13
+ - [@jsenv/lighthouse-impact](../jsenv-lighthouse-impact)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/github-pull-request-impact",
3
- "version": "1.6.9",
3
+ "version": "1.6.10",
4
4
  "description": "Report pull request impact on something",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -33,7 +33,7 @@ export const commentGitHubPullRequestImpact = async ({
33
33
  createCommentForVersionMismatch = jsenvCreateCommentForVersionMismatch,
34
34
  createCommentForComparison = jsenvCreateCommentForComparison,
35
35
  generatedByLink = {
36
- url: "https://github.com/jsenv/github-pull-request-impact",
36
+ url: "https://github.com/jsenv/workflow/tree/main/packages/jsenv-github-pull-request-impact",
37
37
  text: "@jsenv/github-pull-request-impact",
38
38
  },
39
39
  runLink,
@@ -305,9 +305,14 @@ const commentPrImpact = async ({
305
305
  valueIfMissing: "Your Name",
306
306
  execCommandInProjectDirectory,
307
307
  })
308
- await execCommandInProjectDirectory(
309
- `git merge FETCH_HEAD --allow-unrelated-histories`,
310
- )
308
+ // could we use https://stackoverflow.com/a/6283843 ?
309
+ try {
310
+ await execCommandInProjectDirectory(
311
+ `git merge FETCH_HEAD --allow-unrelated-histories --no-ff --no-commit`,
312
+ )
313
+ } catch (e) {
314
+ throw new Error(`git merge command failed (is there a merge conflict?)`)
315
+ }
311
316
  await restoreGitUserEmail()
312
317
  await restoreGitUserName()
313
318
  afterMergeInfo = await collectInfo({
@@ -11,11 +11,11 @@ export const exec = (
11
11
  cwd,
12
12
  stdio: "silent",
13
13
  },
14
- (error) => {
14
+ (error, out) => {
15
15
  if (error) {
16
16
  reject(error)
17
17
  } else {
18
- resolve()
18
+ resolve(out)
19
19
  }
20
20
  },
21
21
  )