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

Squash on green support #161

Merged
merged 4 commits into from
Sep 11, 2020
Merged

Squash on green support #161

merged 4 commits into from
Sep 11, 2020

Conversation

ashfurrow
Copy link
Contributor

This PR does a few things:

  • Update our TypeScript version so we can use as const (also supported on our Peril install).
  • Adds squash-on-green support.
  • Adds unit test.

I've tried to structure the code so that adding a rebase-on-green should be straightforward. Let me know what I can clarify!

Note: once merged, this change will be immediately live for our Peril install. If something goes wrong, the logs are here 🔐 and reverting the PR merge would make things work again.

org/mergeOnGreen.ts Outdated Show resolved Hide resolved
@jonallured jonallured merged commit fbb3e3a into master Sep 11, 2020
@ashfurrow
Copy link
Contributor Author

Okay let's test this out ...

@ashfurrow ashfurrow deleted the squash-on-green branch September 11, 2020 13:51
@ashfurrow
Copy link
Contributor Author

Hmm, the label-adding code worked but I'm seeing problems with the mergeOnGreen.ts file:

2020-09-11T13:53:21.996491+00:00 app[web.1]: Fri, 11 Sep 2020 13:53:21 GMT runFromSameHost Unable to evaluate the Dangerfile
2020-09-11T13:53:21.996506+00:00 app[web.1]:  peril-downloaded-artsy/peril-settings@org/mergeOnGreen.ts:30
2020-09-11T13:53:21.996508+00:00 app[web.1]:         let commitTitle = mergeLabel.commitGenerator ? .(number)
2020-09-11T13:53:21.996508+00:00 app[web.1]:                                                        ^
2020-09-11T13:53:21.996508+00:00 app[web.1]: 
2020-09-11T13:53:21.996509+00:00 app[web.1]: SyntaxError: Unexpected token .
2020-09-11T13:53:21.996510+00:00 app[web.1]:     at Module._compile (internal/modules/cjs/loader.js:723:23)
2020-09-11T13:53:21.996511+00:00 app[web.1]:     at Object.requireFromString [as default] (/app/node_modules/require-from-string/index.js:28:4)
2020-09-11T13:53:21.996511+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/danger/distribution/runner/runners/inline.js:144:63)
2020-09-11T13:53:21.996513+00:00 app[web.1]:     at step (/app/node_modules/danger/distribution/runner/runners/inline.js:32:23)
2020-09-11T13:53:21.996513+00:00 app[web.1]:     at Object.next (/app/node_modules/danger/distribution/runner/runners/inline.js:13:53)
2020-09-11T13:53:21.996513+00:00 app[web.1]:     at /app/node_modules/danger/distribution/runner/runners/inline.js:7:71
2020-09-11T13:53:21.996514+00:00 app[web.1]:     at new Promise (<anonymous>)
2020-09-11T13:53:21.996514+00:00 app[web.1]:     at __awaiter (/app/node_modules/danger/distribution/runner/runners/inline.js:3:12)
2020-09-11T13:53:21.996515+00:00 app[web.1]:     at Object.exports.runDangerfileEnvironment (/app/node_modules/danger/distribution/runner/runners/inline.js:105:136)
2020-09-11T13:53:21.996516+00:00 app[web.1]:     at runDangerEvent (/app/api/out/runner/run.js:101:28)
2020-09-11T13:53:21.996516+00:00 app[web.1]:     at process._tickCallback (internal/process/next_tick.js:68:7)

I'm going to revert this for now since this will break merge-on-green for all our repos. I'll follow-up with another PR that uses less fancy syntax, since it's apparently causing issues with Peril.

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.

3 participants