Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
675 B

  1. 'use strict'
  2. const parserOpts = require(`./parser-opts`)
  3. module.exports = {
  4. parserOpts,
  5. whatBump: (commits) => {
  6. let level = 2
  7. let breakings = 0
  8. let features = 0
  9. commits.forEach(commit => {
  10. if (commit.notes.length > 0) {
  11. breakings += commit.notes.length
  12. level = 0
  13. } else if (commit.type === `feat`) {
  14. features += 1
  15. if (level === 2) {
  16. level = 1
  17. }
  18. }
  19. })
  20. return {
  21. level: level,
  22. reason: breakings === 1
  23. ? `There is ${breakings} BREAKING CHANGE and ${features} features`
  24. : `There are ${breakings} BREAKING CHANGES and ${features} features`
  25. }
  26. }
  27. }