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 support for rebase merging #164

Merged
merged 18 commits into from Apr 26, 2019

Conversation

TimonVS
Copy link
Member

@TimonVS TimonVS commented Apr 3, 2019

This PR will add support for rebase merging and drastically reduces the amount of HTTP calls to GitHub by utilizing the GraphQL API :)
This PR is based off of #160

Solves: #106

Todo

  • Refactor code in commits.js
  • Fix exclude-labels tests
  • Generate new mocks using the release-drafter-test repo
  • Check order of changelog entries
  • Fix version-template config tests
  • Clean up unused code and fixtures
  • Change master to default branch of repo in getCommitsWithAssociatedPullRequestsQuery
  • Add tests for testing merge commits
  • Add tests for testing squash merging
  • Add tests for testing rebase merging
  • Deploy test instance

@TimonVS TimonVS force-pushed the chore/support-rebase-merging branch from a0413af to 8a0e70f Compare April 3, 2019 14:44
package.json Outdated Show resolved Hide resolved
@@ -1,4 +1,6 @@
const log = require('./log')
const paginate = require('./pagination')
const _ = require('lodash')
Copy link
Member

Choose a reason for hiding this comment

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

Would it not be better only to require what you need?

Copy link
Member Author

Choose a reason for hiding this comment

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

Performance wise it shouldn't really matter I think? I like the convenience of having all of Lodash under a single char 😅

@TimonVS

This comment has been minimized.

@toolmantim

This comment has been minimized.

@TimonVS

This comment has been minimized.

@TimonVS

This comment has been minimized.

@jetersen
Copy link
Member

jetersen commented Apr 5, 2019

Could the releases API and content of .github/release-drafter.yml not be replaced by a single GraphQL call?

@TimonVS
Copy link
Member Author

TimonVS commented Apr 5, 2019

@Casz Maybe, but that's outside of the scope of this PR :)

@jetersen
Copy link
Member

jetersen commented Apr 5, 2019

I was just wondering. 🤔

@TimonVS
Copy link
Member Author

TimonVS commented Apr 5, 2019

That's alright, thanks for the suggestion 😊

@TimonVS
Copy link
Member Author

TimonVS commented Apr 17, 2019

I've been a bit low on time the past week. I hope to continue/finish this next week :)

@TimonVS TimonVS force-pushed the chore/support-rebase-merging branch from b6a71da to d5d3ef7 Compare April 23, 2019 11:56
@TimonVS TimonVS changed the title WIP: Add support for rebase merging Add support for rebase merging Apr 24, 2019
@TimonVS
Copy link
Member Author

TimonVS commented Apr 24, 2019

This is ready for review @toolmantim @Casz 😄

@jetersen
Copy link
Member

jetersen commented Apr 24, 2019

@TimonVS a6c6b01 so lovely we use nodes directly and fantastic rewrite! 🙌

lib/pagination.js Outdated Show resolved Hide resolved
@TimonVS
Copy link
Member Author

TimonVS commented Apr 24, 2019

Thanks for the kind words @Casz :)

Copy link
Member

@jetersen jetersen left a comment

Choose a reason for hiding this comment

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

LGTM, one minor comment

if (lastRelease) {
log({
app,
context,
message: `Comparing commits ${lastRelease.tag_name}..${branch}`
message: `Fetching all commits for branch ${branch} since ${
lastRelease.published_at
Copy link
Member

Choose a reason for hiding this comment

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

looks funky

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah looks a bit weird, it happens because the max line length is reached. There's not much I can do about it except increasing the line length 😬. I personally don't really mind though.

Copy link
Collaborator

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

Thanks for all the work on this @TimonVS! Looks good 👍🏼

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.

None yet

3 participants