├── .dockerignore ├── .env.example ├── .github ├── release-drafter.yml └── workflows │ └── node.js.yml ├── .gitignore ├── .travis.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── design ├── github-app-logo.png ├── install-button.svg ├── logo.sketch ├── logo.svg ├── logo@2x.png ├── logo@4x.png └── screenshot.png ├── docker-compose.yml ├── index.js ├── lib ├── base46.js ├── pattern-replace.js └── run.js ├── package.json ├── renovate.json ├── test ├── fixtures │ ├── config-no-updates.yml │ ├── config-updates-no-path.yml │ ├── config-updates-no-pattern.yml │ ├── config-with-non-master-branch.yml │ ├── config-with-skip-ci.yml │ ├── config.yml │ ├── push-config-change.json │ ├── push-non-master-branch.json │ ├── push-unrelated-change.json │ ├── release-draft.json │ ├── release-old-version.json │ ├── release-prerelease.json │ └── release.json ├── helpers │ └── mock-responses.js ├── index.test.js └── pattern-replace.test.js └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | design 2 | node_modules 3 | .env 4 | .env.example 5 | coverage 6 | .buildkite 7 | *.pem -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # The ID of your GitHub App 2 | APP_ID=13956 3 | WEBHOOK_SECRET=development 4 | 5 | # Use `trace` to get verbose logging or `info` to show less 6 | LOG_LEVEL=debug 7 | 8 | # Go to https://smee.io/new set this to the URL that you are redirected to. 9 | WEBHOOK_PROXY_URL= 10 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | # Config for https://github.com/apps/release-drafter 2 | template: | 3 | ## What's Changed 4 | 5 | $CHANGES 6 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | name: Node.js CI 2 | on: [ push, pull_request ] 3 | jobs: 4 | build: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2 8 | - name: Use Node.js 14.x 9 | uses: actions/setup-node@v1 10 | with: 11 | node-version: 14.x 12 | - run: yarn --frozen-lockfile 13 | - run: yarn test 14 | env: 15 | CI: true -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | *.pem 4 | .env 5 | coverage 6 | now.json 7 | docker-compose-logs -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: minimal 2 | sudo: required 3 | services: 4 | - docker 5 | script: docker-compose run app npm test -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at t@toolmantim.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | [fork]: /fork 4 | [pr]: /compare 5 | [style]: https://standardjs.com/ 6 | [code-of-conduct]: CODE_OF_CONDUCT.md 7 | 8 | Hi there! I'm thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. 9 | 10 | Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. 11 | 12 | ## Submitting a pull request 13 | 14 | 1. [Fork][fork] and clone the repository 15 | 1. Configure and install the dependencies: `npm install` 16 | 1. Make sure the tests pass on your machine: `npm test`, note: these tests also apply the linter, so no need to lint seperately 17 | 1. Create a new branch: `git checkout -b my-branch-name` 18 | 1. Make your change, add tests, and make sure the tests still pass 19 | 1. Push to your fork and [submit a pull request][pr] 20 | 1. Give yourself a high five, and wait for your pull request to be reviewed and merged. 21 | 22 | Here are a few things you can do that will increase the likelihood of your pull request being accepted: 23 | 24 | - Follow the [style guide][style] which is using standard. Any linting errors should be shown when running `npm test` 25 | - Write and update tests. 26 | - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. 27 | - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 28 | 29 | Work in Progress pull request are also welcome to get feedback early on, or if there is something blocked you. 30 | 31 | ## Resources 32 | 33 | - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) 34 | - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) 35 | - [GitHub Help](https://help.github.com) 36 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14-alpine 2 | WORKDIR /src 3 | ADD yarn.lock package.json /src/ 4 | RUN yarn 5 | ADD . /src 6 | CMD ["npm", "start"] 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2018, Tim Lucas 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
Bump version numbers in files whenever new releases are published to GitHub. Built with Probot.
6 | 7 | --- 8 | 9 | 10 | 11 | --- 12 | 13 | [](https://www.npmjs.com/package/boomper-github-app) 14 | 15 | ## Usage 16 | 17 | Firstly, you’ll need to install the [Boomper GitHub App](https://github.com/apps/boomper-bot). This listens out for any releases, or any changes to the configuration. 18 | 19 | Then, add a `.github/boomper.yml` configuration file to the GitHub repository where you publish new releases to. 20 | 21 | For example, given the following `.github/boomper.yml` file: 22 | 23 | ```yml 24 | updates: 25 | - path: README.md 26 | pattern: 'https://someurl.com/(v.*)/download.zip' 27 | ``` 28 | 29 | And given the following `README.md` file: 30 | 31 | ```markdown 32 | Install with `curl https://someurl.com/v1.0.0/download.zip` 33 | ``` 34 | 35 | Then when a new release is published (e.g. `v2.0.0`), Boomper will update the `README.md` to: 36 | 37 | ```markdown 38 | Install with `curl https://someurl.com/v2.0.0/download.zip` 39 | ``` 40 | 41 | ## Examples 42 | 43 | ### [Buildkite Plugin Readmes](https://buildkite.com/docs/agent/v3/plugins) 44 | 45 | ```yml 46 | updates: 47 | - path: README.md 48 | pattern: 'my-org/my-plugin#(v.*):' 49 | ``` 50 | 51 | ## Configuration options 52 | 53 | You can configure Boomper using the following key in your `.github/boomper.yml` file: 54 | 55 | |Key|Required|Description| 56 | |-|-|-| 57 | |`updates`|Required|A list of paths and patterns to update when a new release is published.| 58 | |`updates.[].path`|Required|The path to the file to update.| 59 | |`updates.[].pattern`|Required|The regular expression containing a single group, which will be used to match and update the version number in the file.| 60 | |`updates.[].branch`|Optional|The branch to update. Default is the repository's default branch (e.g. `master`).| 61 | |`branches`|Optional|The branches to listen for configuration updates to `.github/boomper.yml`. Useful if you want to test the app on a pull request branch. Default is `"master"`.| 62 | |`skip-ci`|Optional|Appends `[ci skip]` to commit messages to prevent triggering additional CI builds. Default is `false`.| 63 | 64 | ## Developing 65 | 66 | If you have Node v10+ installed locally, you can run the tests, and a local app, using the following commands: 67 | 68 | ```sh 69 | # Install dependencies 70 | yarn 71 | 72 | # Run the tests 73 | npm test 74 | 75 | # Run the app locally 76 | npm start 77 | ``` 78 | 79 | If you don't have Node installed, you can use [Docker Compose](https://docs.docker.com/compose/): 80 | 81 | ```sh 82 | # Run the tests 83 | docker-compose run --rm app npm test 84 | ``` 85 | 86 | ## Contributing 87 | 88 | Third-pary contributions are welcome! 🙏🏼 See [CONTRIBUTING.md](CONTRIBUTING.md) for step-by-step instructions. 89 | 90 | If you need help or have a question, let me know via a GitHub issue. 91 | 92 | ## Deployment 93 | 94 | If you want to deploy your own copy of Boomper, follow the [Probot Deployment Guide](https://probot.github.io/docs/deployment/). 95 | 96 | ## Releasing 97 | 98 | Run the following command: 99 | 100 | ```bash 101 | git checkout master && git pull && npm version [major | minor | patch] 102 | ``` 103 | 104 | The command does the following: 105 | 106 | * Ensures you’re on master and don't have local, un-commited changes 107 | * Bumps the version number in [package.json](package.json) based on major, minor or patch 108 | * Runs the `postversion` npm script in [package.json](package.json), which: 109 | * Pushes the tag to GitHub 110 | * Publishes the npm release 111 | * Opens the GitHub releases page so you can publish the release notes -------------------------------------------------------------------------------- /design/github-app-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toolmantim/boomper/9a6d5be2eeda43902250e7f6dcdb5c3bd707649d/design/github-app-logo.png -------------------------------------------------------------------------------- /design/install-button.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /design/logo.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toolmantim/boomper/9a6d5be2eeda43902250e7f6dcdb5c3bd707649d/design/logo.sketch -------------------------------------------------------------------------------- /design/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /design/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toolmantim/boomper/9a6d5be2eeda43902250e7f6dcdb5c3bd707649d/design/logo@2x.png -------------------------------------------------------------------------------- /design/logo@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toolmantim/boomper/9a6d5be2eeda43902250e7f6dcdb5c3bd707649d/design/logo@4x.png -------------------------------------------------------------------------------- /design/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toolmantim/boomper/9a6d5be2eeda43902250e7f6dcdb5c3bd707649d/design/screenshot.png -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.4" 2 | services: 3 | app: 4 | build: . 5 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const run = require('./lib/run') 2 | const configName = 'boomper.yml' 3 | 4 | module.exports = app => { 5 | app.on('release', async context => { 6 | await run({ context, configName }) 7 | }) 8 | 9 | app.on('push', async context => { 10 | const configPath = `.github/${configName}` 11 | 12 | if (context.payload.commits.some(commit => ( 13 | commit.added.includes(configPath) || 14 | commit.removed.includes(configPath) || 15 | commit.modified.includes(configPath) 16 | ))) { 17 | await run({ context, configName }) 18 | } else { 19 | context.log(`Ignoring push that didn't modify ${configPath}`) 20 | } 21 | }) 22 | } 23 | -------------------------------------------------------------------------------- /lib/base46.js: -------------------------------------------------------------------------------- 1 | module.exports.encodeContent = (content) => { 2 | return Buffer.from(content).toString('base64') 3 | } 4 | 5 | module.exports.decodeContent = (content) => { 6 | return Buffer.from(content, 'base64').toString() 7 | } 8 | -------------------------------------------------------------------------------- /lib/pattern-replace.js: -------------------------------------------------------------------------------- 1 | module.exports = ({ pattern, version, content }) => { 2 | // The pattern arg contains a single sub-group, e.g. 3 | // 'https://host.com/(.*)/file.zip' 4 | // 5 | // But we want to replace the bit in parentheses with the version arg, and 6 | // leave the rest. 7 | // 8 | // To do this we create a new pattern, containing our own grouping containing 9 | // the before and after parts as well. e.g. 10 | // '(https://host.com/)(.*)(/file.zip)' 11 | 12 | const newPattern = pattern.replace(/^(.*)(\(.*\))(.*)$/, '($1)$2($3)') 13 | 14 | return content.replace(new RegExp(newPattern, 'g'), (match, p1, p2, p3) => { 15 | return `${p1}${version}${p3}` 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /lib/run.js: -------------------------------------------------------------------------------- 1 | const compareVersions = require('compare-versions') 2 | const { decodeContent, encodeContent } = require('./base46') 3 | const patternReplace = require('./pattern-replace') 4 | 5 | const runUpdate = async ({ context, path, pattern, branch, release, skipCi }) => { 6 | const version = release.tag_name 7 | 8 | if (!path || !pattern) { 9 | context.log.info('No valid config found') 10 | return 11 | } 12 | 13 | const contentResponse = await context.github.repos.getContent(context.repo({ path })) 14 | const content = decodeContent(contentResponse.data.content) 15 | const updatedContent = patternReplace({ content, pattern, version }) 16 | 17 | if (content === updatedContent) { 18 | context.log.info('No change in content') 19 | return 20 | } 21 | 22 | let message = `Bump ${path} for ${version} release` 23 | if (skipCi) { 24 | message += ' [skip ci]' 25 | } 26 | 27 | await context.github.repos.createOrUpdateFileContents(context.repo({ 28 | path, 29 | message, 30 | content: encodeContent(updatedContent), 31 | sha: contentResponse.data.sha, 32 | branch: branch 33 | })) 34 | 35 | context.log(`Updated ${path}`) 36 | } 37 | 38 | module.exports = async ({ context, configName }) => { 39 | const config = await context.config(configName) || {} 40 | const skipCi = config['skip-ci'] 41 | let { updates, branches } = config 42 | 43 | if (!branches) { 44 | branches = ['master'] 45 | } 46 | 47 | if (!updates) { 48 | context.log.info('No valid config found') 49 | return 50 | } 51 | 52 | if (context.event === 'push') { 53 | const branch = context.payload.ref.replace(/^refs\/heads\//, '') 54 | if (branches.indexOf(branch) === -1) { 55 | context.log.info(`Ignoring push. ${branch} is not one of: ${branches.join(', ')}`) 56 | return 57 | } 58 | } 59 | 60 | let releases = await context.github.paginate( 61 | context.github.repos.listReleases, 62 | context.repo(), 63 | res => res.data 64 | ) 65 | 66 | releases = releases 67 | .filter(r => !r.draft) 68 | .sort((r1, r2) => compareVersions(r2.tag_name, r1.tag_name)) 69 | 70 | if (releases.length === 0) { 71 | context.log.info('No releases found') 72 | return 73 | } 74 | 75 | const release = releases.filter(r => !r.prerelease)[0] 76 | 77 | if (release) { 78 | return Promise.all(updates.map((update) => runUpdate({ 79 | context, 80 | release, 81 | skipCi, 82 | ...update 83 | }))) 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "boomper-github-app", 3 | "version": "1.1.0", 4 | "description": "A GitHub app that bumps version numbers in files whenever new releases are published to GitHub", 5 | "author": "Tim Lucas (https://github.com/toolmantim)", 6 | "license": "ISC", 7 | "repository": "toolmantim/boomper", 8 | "scripts": { 9 | "dev": "nodemon --exec \"npm start\"", 10 | "start": "probot run ./index.js", 11 | "now-start": "PRIVATE_KEY=$(echo $PRIVATE_KEY_BASE64 | base64 -d) npm start", 12 | "lint": "standard --fix", 13 | "test": "jest && standard", 14 | "test:watch": "jest --watch --notify --notifyMode=change --coverage", 15 | "postversion": "npm run test && git push && git push --tags && npm publish && npm run deploy && npm run open-releases", 16 | "open-releases": "open \"$(node -e 'console.log(`https://github.com/${require(\"./package.json\").repository}/releases`)')\"", 17 | "deploy": "now && now alias" 18 | }, 19 | "dependencies": { 20 | "compare-versions": "3.6.0", 21 | "probot": "10.8.0", 22 | "request": "2.88.2" 23 | }, 24 | "devDependencies": { 25 | "jest": "26.4.2", 26 | "nock": "13.0.4", 27 | "nodemon": "2.0.4", 28 | "smee-client": "1.2.2", 29 | "standard": "14.3.4" 30 | }, 31 | "engines": { 32 | "node": ">= 14" 33 | }, 34 | "standard": { 35 | "env": [ 36 | "jest" 37 | ] 38 | }, 39 | "jest": { 40 | "collectCoverage": true, 41 | "collectCoverageFrom": [ 42 | "index.js", 43 | "lib/**" 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/fixtures/config-no-updates.yml: -------------------------------------------------------------------------------- 1 | invalid: config -------------------------------------------------------------------------------- /test/fixtures/config-updates-no-path.yml: -------------------------------------------------------------------------------- 1 | updates: 2 | - pattern: https://download.com/(.*)/file.zip 3 | -------------------------------------------------------------------------------- /test/fixtures/config-updates-no-pattern.yml: -------------------------------------------------------------------------------- 1 | updates: 2 | - path: README.md 3 | -------------------------------------------------------------------------------- /test/fixtures/config-with-non-master-branch.yml: -------------------------------------------------------------------------------- 1 | updates: 2 | - path: README.md 3 | pattern: https://download.com/(.*)/file.zip 4 | branches: 5 | - some-branch -------------------------------------------------------------------------------- /test/fixtures/config-with-skip-ci.yml: -------------------------------------------------------------------------------- 1 | updates: 2 | - path: README.md 3 | pattern: https://download.com/(.*)/file.zip 4 | skip-ci: true -------------------------------------------------------------------------------- /test/fixtures/config.yml: -------------------------------------------------------------------------------- 1 | updates: 2 | - path: README.md 3 | pattern: https://download.com/(.*)/file.zip 4 | -------------------------------------------------------------------------------- /test/fixtures/push-config-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "refs/heads/master", 3 | "before": "0ef7edf5c4b863153df93bd837033d885f6339b8", 4 | "after": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 5 | "created": false, 6 | "deleted": false, 7 | "forced": false, 8 | "base_ref": null, 9 | "compare": "https://github.com/toolmantim/boomper-test-project/compare/0ef7edf5c4b8...1496a1f82f32", 10 | "commits": [ 11 | { 12 | "id": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 13 | "tree_id": "f011061c665e93f126028ccf54ca6aaa6dbfec48", 14 | "distinct": true, 15 | "message": "Update boomper.yml", 16 | "timestamp": "2018-05-20T22:43:43+10:00", 17 | "url": "https://github.com/toolmantim/boomper-test-project/commit/1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 18 | "author": { 19 | "name": "Tim Lucas", 20 | "email": "t@toolmantim.com", 21 | "username": "toolmantim" 22 | }, 23 | "committer": { 24 | "name": "GitHub", 25 | "email": "noreply@github.com", 26 | "username": "web-flow" 27 | }, 28 | "added": [ 29 | 30 | ], 31 | "removed": [ 32 | 33 | ], 34 | "modified": [ 35 | ".github/boomper.yml" 36 | ] 37 | } 38 | ], 39 | "head_commit": { 40 | "id": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 41 | "tree_id": "f011061c665e93f126028ccf54ca6aaa6dbfec48", 42 | "distinct": true, 43 | "message": "Update boomper.yml", 44 | "timestamp": "2018-05-20T22:43:43+10:00", 45 | "url": "https://github.com/toolmantim/boomper-test-project/commit/1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 46 | "author": { 47 | "name": "Tim Lucas", 48 | "email": "t@toolmantim.com", 49 | "username": "toolmantim" 50 | }, 51 | "committer": { 52 | "name": "GitHub", 53 | "email": "noreply@github.com", 54 | "username": "web-flow" 55 | }, 56 | "added": [ 57 | 58 | ], 59 | "removed": [ 60 | 61 | ], 62 | "modified": [ 63 | ".github/boomper.yml" 64 | ] 65 | }, 66 | "repository": { 67 | "id": 133810100, 68 | "name": "boomper-test-project", 69 | "full_name": "toolmantim/boomper-test-project", 70 | "owner": { 71 | "name": "toolmantim", 72 | "email": "t@toolmantim.com", 73 | "login": "toolmantim", 74 | "id": 153, 75 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 76 | "gravatar_id": "", 77 | "url": "https://api.github.com/users/toolmantim", 78 | "html_url": "https://github.com/toolmantim", 79 | "followers_url": "https://api.github.com/users/toolmantim/followers", 80 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 81 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 82 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 83 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 84 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 85 | "repos_url": "https://api.github.com/users/toolmantim/repos", 86 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 87 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 88 | "type": "User", 89 | "site_admin": false 90 | }, 91 | "private": true, 92 | "html_url": "https://github.com/toolmantim/boomper-test-project", 93 | "description": "What a project", 94 | "fork": false, 95 | "url": "https://github.com/toolmantim/boomper-test-project", 96 | "forks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/forks", 97 | "keys_url": "https://api.github.com/repos/toolmantim/boomper-test-project/keys{/key_id}", 98 | "collaborators_url": "https://api.github.com/repos/toolmantim/boomper-test-project/collaborators{/collaborator}", 99 | "teams_url": "https://api.github.com/repos/toolmantim/boomper-test-project/teams", 100 | "hooks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/hooks", 101 | "issue_events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/events{/number}", 102 | "events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/events", 103 | "assignees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/assignees{/user}", 104 | "branches_url": "https://api.github.com/repos/toolmantim/boomper-test-project/branches{/branch}", 105 | "tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tags", 106 | "blobs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/blobs{/sha}", 107 | "git_tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/tags{/sha}", 108 | "git_refs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/refs{/sha}", 109 | "trees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/trees{/sha}", 110 | "statuses_url": "https://api.github.com/repos/toolmantim/boomper-test-project/statuses/{sha}", 111 | "languages_url": "https://api.github.com/repos/toolmantim/boomper-test-project/languages", 112 | "stargazers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/stargazers", 113 | "contributors_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contributors", 114 | "subscribers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscribers", 115 | "subscription_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscription", 116 | "commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/commits{/sha}", 117 | "git_commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/commits{/sha}", 118 | "comments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/comments{/number}", 119 | "issue_comment_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/comments{/number}", 120 | "contents_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contents/{+path}", 121 | "compare_url": "https://api.github.com/repos/toolmantim/boomper-test-project/compare/{base}...{head}", 122 | "merges_url": "https://api.github.com/repos/toolmantim/boomper-test-project/merges", 123 | "archive_url": "https://api.github.com/repos/toolmantim/boomper-test-project/{archive_format}{/ref}", 124 | "downloads_url": "https://api.github.com/repos/toolmantim/boomper-test-project/downloads", 125 | "issues_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues{/number}", 126 | "pulls_url": "https://api.github.com/repos/toolmantim/boomper-test-project/pulls{/number}", 127 | "milestones_url": "https://api.github.com/repos/toolmantim/boomper-test-project/milestones{/number}", 128 | "notifications_url": "https://api.github.com/repos/toolmantim/boomper-test-project/notifications{?since,all,participating}", 129 | "labels_url": "https://api.github.com/repos/toolmantim/boomper-test-project/labels{/name}", 130 | "releases_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases{/id}", 131 | "deployments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/deployments", 132 | "created_at": 1526560050, 133 | "updated_at": "2018-05-20T12:37:47Z", 134 | "pushed_at": 1526820223, 135 | "git_url": "git://github.com/toolmantim/boomper-test-project.git", 136 | "ssh_url": "git@github.com:toolmantim/boomper-test-project.git", 137 | "clone_url": "https://github.com/toolmantim/boomper-test-project.git", 138 | "svn_url": "https://github.com/toolmantim/boomper-test-project", 139 | "homepage": "https://github.com/toolmantim/boomper-test-project-formula", 140 | "size": 1, 141 | "stargazers_count": 0, 142 | "watchers_count": 0, 143 | "language": null, 144 | "has_issues": false, 145 | "has_projects": false, 146 | "has_downloads": true, 147 | "has_wiki": false, 148 | "has_pages": false, 149 | "forks_count": 0, 150 | "mirror_url": null, 151 | "archived": false, 152 | "open_issues_count": 0, 153 | "license": null, 154 | "forks": 0, 155 | "open_issues": 0, 156 | "watchers": 0, 157 | "default_branch": "master", 158 | "stargazers": 0, 159 | "master_branch": "master" 160 | }, 161 | "pusher": { 162 | "name": "toolmantim", 163 | "email": "t@toolmantim.com" 164 | }, 165 | "sender": { 166 | "login": "toolmantim", 167 | "id": 153, 168 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 169 | "gravatar_id": "", 170 | "url": "https://api.github.com/users/toolmantim", 171 | "html_url": "https://github.com/toolmantim", 172 | "followers_url": "https://api.github.com/users/toolmantim/followers", 173 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 174 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 175 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 176 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 177 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 178 | "repos_url": "https://api.github.com/users/toolmantim/repos", 179 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 180 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 181 | "type": "User", 182 | "site_admin": false 183 | }, 184 | "installation": { 185 | "id": 179208 186 | } 187 | } -------------------------------------------------------------------------------- /test/fixtures/push-non-master-branch.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "refs/heads/some-branch", 3 | "before": "0ef7edf5c4b863153df93bd837033d885f6339b8", 4 | "after": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 5 | "created": false, 6 | "deleted": false, 7 | "forced": false, 8 | "base_ref": null, 9 | "compare": "https://github.com/toolmantim/boomper-test-project/compare/0ef7edf5c4b8...1496a1f82f32", 10 | "commits": [ 11 | { 12 | "id": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 13 | "tree_id": "f011061c665e93f126028ccf54ca6aaa6dbfec48", 14 | "distinct": true, 15 | "message": "Update boomper.yml", 16 | "timestamp": "2018-05-20T22:43:43+10:00", 17 | "url": "https://github.com/toolmantim/boomper-test-project/commit/1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 18 | "author": { 19 | "name": "Tim Lucas", 20 | "email": "t@toolmantim.com", 21 | "username": "toolmantim" 22 | }, 23 | "committer": { 24 | "name": "GitHub", 25 | "email": "noreply@github.com", 26 | "username": "web-flow" 27 | }, 28 | "added": [ 29 | 30 | ], 31 | "removed": [ 32 | 33 | ], 34 | "modified": [ 35 | ".github/boomper.yml" 36 | ] 37 | } 38 | ], 39 | "head_commit": { 40 | "id": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 41 | "tree_id": "f011061c665e93f126028ccf54ca6aaa6dbfec48", 42 | "distinct": true, 43 | "message": "Update boomper.yml", 44 | "timestamp": "2018-05-20T22:43:43+10:00", 45 | "url": "https://github.com/toolmantim/boomper-test-project/commit/1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 46 | "author": { 47 | "name": "Tim Lucas", 48 | "email": "t@toolmantim.com", 49 | "username": "toolmantim" 50 | }, 51 | "committer": { 52 | "name": "GitHub", 53 | "email": "noreply@github.com", 54 | "username": "web-flow" 55 | }, 56 | "added": [ 57 | 58 | ], 59 | "removed": [ 60 | 61 | ], 62 | "modified": [ 63 | ".github/boomper.yml" 64 | ] 65 | }, 66 | "repository": { 67 | "id": 133810100, 68 | "name": "boomper-test-project", 69 | "full_name": "toolmantim/boomper-test-project", 70 | "owner": { 71 | "name": "toolmantim", 72 | "email": "t@toolmantim.com", 73 | "login": "toolmantim", 74 | "id": 153, 75 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 76 | "gravatar_id": "", 77 | "url": "https://api.github.com/users/toolmantim", 78 | "html_url": "https://github.com/toolmantim", 79 | "followers_url": "https://api.github.com/users/toolmantim/followers", 80 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 81 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 82 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 83 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 84 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 85 | "repos_url": "https://api.github.com/users/toolmantim/repos", 86 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 87 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 88 | "type": "User", 89 | "site_admin": false 90 | }, 91 | "private": true, 92 | "html_url": "https://github.com/toolmantim/boomper-test-project", 93 | "description": "What a project", 94 | "fork": false, 95 | "url": "https://github.com/toolmantim/boomper-test-project", 96 | "forks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/forks", 97 | "keys_url": "https://api.github.com/repos/toolmantim/boomper-test-project/keys{/key_id}", 98 | "collaborators_url": "https://api.github.com/repos/toolmantim/boomper-test-project/collaborators{/collaborator}", 99 | "teams_url": "https://api.github.com/repos/toolmantim/boomper-test-project/teams", 100 | "hooks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/hooks", 101 | "issue_events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/events{/number}", 102 | "events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/events", 103 | "assignees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/assignees{/user}", 104 | "branches_url": "https://api.github.com/repos/toolmantim/boomper-test-project/branches{/branch}", 105 | "tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tags", 106 | "blobs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/blobs{/sha}", 107 | "git_tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/tags{/sha}", 108 | "git_refs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/refs{/sha}", 109 | "trees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/trees{/sha}", 110 | "statuses_url": "https://api.github.com/repos/toolmantim/boomper-test-project/statuses/{sha}", 111 | "languages_url": "https://api.github.com/repos/toolmantim/boomper-test-project/languages", 112 | "stargazers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/stargazers", 113 | "contributors_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contributors", 114 | "subscribers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscribers", 115 | "subscription_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscription", 116 | "commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/commits{/sha}", 117 | "git_commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/commits{/sha}", 118 | "comments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/comments{/number}", 119 | "issue_comment_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/comments{/number}", 120 | "contents_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contents/{+path}", 121 | "compare_url": "https://api.github.com/repos/toolmantim/boomper-test-project/compare/{base}...{head}", 122 | "merges_url": "https://api.github.com/repos/toolmantim/boomper-test-project/merges", 123 | "archive_url": "https://api.github.com/repos/toolmantim/boomper-test-project/{archive_format}{/ref}", 124 | "downloads_url": "https://api.github.com/repos/toolmantim/boomper-test-project/downloads", 125 | "issues_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues{/number}", 126 | "pulls_url": "https://api.github.com/repos/toolmantim/boomper-test-project/pulls{/number}", 127 | "milestones_url": "https://api.github.com/repos/toolmantim/boomper-test-project/milestones{/number}", 128 | "notifications_url": "https://api.github.com/repos/toolmantim/boomper-test-project/notifications{?since,all,participating}", 129 | "labels_url": "https://api.github.com/repos/toolmantim/boomper-test-project/labels{/name}", 130 | "releases_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases{/id}", 131 | "deployments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/deployments", 132 | "created_at": 1526560050, 133 | "updated_at": "2018-05-20T12:37:47Z", 134 | "pushed_at": 1526820223, 135 | "git_url": "git://github.com/toolmantim/boomper-test-project.git", 136 | "ssh_url": "git@github.com:toolmantim/boomper-test-project.git", 137 | "clone_url": "https://github.com/toolmantim/boomper-test-project.git", 138 | "svn_url": "https://github.com/toolmantim/boomper-test-project", 139 | "homepage": "https://github.com/toolmantim/boomper-test-project-formula", 140 | "size": 1, 141 | "stargazers_count": 0, 142 | "watchers_count": 0, 143 | "language": null, 144 | "has_issues": false, 145 | "has_projects": false, 146 | "has_downloads": true, 147 | "has_wiki": false, 148 | "has_pages": false, 149 | "forks_count": 0, 150 | "mirror_url": null, 151 | "archived": false, 152 | "open_issues_count": 0, 153 | "license": null, 154 | "forks": 0, 155 | "open_issues": 0, 156 | "watchers": 0, 157 | "default_branch": "master", 158 | "stargazers": 0, 159 | "master_branch": "master" 160 | }, 161 | "pusher": { 162 | "name": "toolmantim", 163 | "email": "t@toolmantim.com" 164 | }, 165 | "sender": { 166 | "login": "toolmantim", 167 | "id": 153, 168 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 169 | "gravatar_id": "", 170 | "url": "https://api.github.com/users/toolmantim", 171 | "html_url": "https://github.com/toolmantim", 172 | "followers_url": "https://api.github.com/users/toolmantim/followers", 173 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 174 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 175 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 176 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 177 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 178 | "repos_url": "https://api.github.com/users/toolmantim/repos", 179 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 180 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 181 | "type": "User", 182 | "site_admin": false 183 | }, 184 | "installation": { 185 | "id": 179208 186 | } 187 | } -------------------------------------------------------------------------------- /test/fixtures/push-unrelated-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "refs/heads/master", 3 | "before": "0ef7edf5c4b863153df93bd837033d885f6339b8", 4 | "after": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 5 | "created": false, 6 | "deleted": false, 7 | "forced": false, 8 | "base_ref": null, 9 | "compare": "https://github.com/toolmantim/boomper-test-project/compare/0ef7edf5c4b8...1496a1f82f32", 10 | "commits": [ 11 | { 12 | "id": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 13 | "tree_id": "f011061c665e93f126028ccf54ca6aaa6dbfec48", 14 | "distinct": true, 15 | "message": "Update boomper.yml", 16 | "timestamp": "2018-05-20T22:43:43+10:00", 17 | "url": "https://github.com/toolmantim/boomper-test-project/commit/1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 18 | "author": { 19 | "name": "Tim Lucas", 20 | "email": "t@toolmantim.com", 21 | "username": "toolmantim" 22 | }, 23 | "committer": { 24 | "name": "GitHub", 25 | "email": "noreply@github.com", 26 | "username": "web-flow" 27 | }, 28 | "added": [ 29 | 30 | ], 31 | "removed": [ 32 | 33 | ], 34 | "modified": [ 35 | "some-other-file.md" 36 | ] 37 | } 38 | ], 39 | "head_commit": { 40 | "id": "1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 41 | "tree_id": "f011061c665e93f126028ccf54ca6aaa6dbfec48", 42 | "distinct": true, 43 | "message": "Update boomper.yml", 44 | "timestamp": "2018-05-20T22:43:43+10:00", 45 | "url": "https://github.com/toolmantim/boomper-test-project/commit/1496a1f82f32f240f7cbe1a42eb0b0c7a06a5093", 46 | "author": { 47 | "name": "Tim Lucas", 48 | "email": "t@toolmantim.com", 49 | "username": "toolmantim" 50 | }, 51 | "committer": { 52 | "name": "GitHub", 53 | "email": "noreply@github.com", 54 | "username": "web-flow" 55 | }, 56 | "added": [ 57 | 58 | ], 59 | "removed": [ 60 | 61 | ], 62 | "modified": [ 63 | "some-other-file.md" 64 | ] 65 | }, 66 | "repository": { 67 | "id": 133810100, 68 | "name": "boomper-test-project", 69 | "full_name": "toolmantim/boomper-test-project", 70 | "owner": { 71 | "name": "toolmantim", 72 | "email": "t@toolmantim.com", 73 | "login": "toolmantim", 74 | "id": 153, 75 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 76 | "gravatar_id": "", 77 | "url": "https://api.github.com/users/toolmantim", 78 | "html_url": "https://github.com/toolmantim", 79 | "followers_url": "https://api.github.com/users/toolmantim/followers", 80 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 81 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 82 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 83 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 84 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 85 | "repos_url": "https://api.github.com/users/toolmantim/repos", 86 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 87 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 88 | "type": "User", 89 | "site_admin": false 90 | }, 91 | "private": true, 92 | "html_url": "https://github.com/toolmantim/boomper-test-project", 93 | "description": "What a project", 94 | "fork": false, 95 | "url": "https://github.com/toolmantim/boomper-test-project", 96 | "forks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/forks", 97 | "keys_url": "https://api.github.com/repos/toolmantim/boomper-test-project/keys{/key_id}", 98 | "collaborators_url": "https://api.github.com/repos/toolmantim/boomper-test-project/collaborators{/collaborator}", 99 | "teams_url": "https://api.github.com/repos/toolmantim/boomper-test-project/teams", 100 | "hooks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/hooks", 101 | "issue_events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/events{/number}", 102 | "events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/events", 103 | "assignees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/assignees{/user}", 104 | "branches_url": "https://api.github.com/repos/toolmantim/boomper-test-project/branches{/branch}", 105 | "tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tags", 106 | "blobs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/blobs{/sha}", 107 | "git_tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/tags{/sha}", 108 | "git_refs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/refs{/sha}", 109 | "trees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/trees{/sha}", 110 | "statuses_url": "https://api.github.com/repos/toolmantim/boomper-test-project/statuses/{sha}", 111 | "languages_url": "https://api.github.com/repos/toolmantim/boomper-test-project/languages", 112 | "stargazers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/stargazers", 113 | "contributors_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contributors", 114 | "subscribers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscribers", 115 | "subscription_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscription", 116 | "commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/commits{/sha}", 117 | "git_commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/commits{/sha}", 118 | "comments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/comments{/number}", 119 | "issue_comment_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/comments{/number}", 120 | "contents_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contents/{+path}", 121 | "compare_url": "https://api.github.com/repos/toolmantim/boomper-test-project/compare/{base}...{head}", 122 | "merges_url": "https://api.github.com/repos/toolmantim/boomper-test-project/merges", 123 | "archive_url": "https://api.github.com/repos/toolmantim/boomper-test-project/{archive_format}{/ref}", 124 | "downloads_url": "https://api.github.com/repos/toolmantim/boomper-test-project/downloads", 125 | "issues_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues{/number}", 126 | "pulls_url": "https://api.github.com/repos/toolmantim/boomper-test-project/pulls{/number}", 127 | "milestones_url": "https://api.github.com/repos/toolmantim/boomper-test-project/milestones{/number}", 128 | "notifications_url": "https://api.github.com/repos/toolmantim/boomper-test-project/notifications{?since,all,participating}", 129 | "labels_url": "https://api.github.com/repos/toolmantim/boomper-test-project/labels{/name}", 130 | "releases_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases{/id}", 131 | "deployments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/deployments", 132 | "created_at": 1526560050, 133 | "updated_at": "2018-05-20T12:37:47Z", 134 | "pushed_at": 1526820223, 135 | "git_url": "git://github.com/toolmantim/boomper-test-project.git", 136 | "ssh_url": "git@github.com:toolmantim/boomper-test-project.git", 137 | "clone_url": "https://github.com/toolmantim/boomper-test-project.git", 138 | "svn_url": "https://github.com/toolmantim/boomper-test-project", 139 | "homepage": "https://github.com/toolmantim/boomper-test-project-formula", 140 | "size": 1, 141 | "stargazers_count": 0, 142 | "watchers_count": 0, 143 | "language": null, 144 | "has_issues": false, 145 | "has_projects": false, 146 | "has_downloads": true, 147 | "has_wiki": false, 148 | "has_pages": false, 149 | "forks_count": 0, 150 | "mirror_url": null, 151 | "archived": false, 152 | "open_issues_count": 0, 153 | "license": null, 154 | "forks": 0, 155 | "open_issues": 0, 156 | "watchers": 0, 157 | "default_branch": "master", 158 | "stargazers": 0, 159 | "master_branch": "master" 160 | }, 161 | "pusher": { 162 | "name": "toolmantim", 163 | "email": "t@toolmantim.com" 164 | }, 165 | "sender": { 166 | "login": "toolmantim", 167 | "id": 153, 168 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 169 | "gravatar_id": "", 170 | "url": "https://api.github.com/users/toolmantim", 171 | "html_url": "https://github.com/toolmantim", 172 | "followers_url": "https://api.github.com/users/toolmantim/followers", 173 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 174 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 175 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 176 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 177 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 178 | "repos_url": "https://api.github.com/users/toolmantim/repos", 179 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 180 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 181 | "type": "User", 182 | "site_admin": false 183 | }, 184 | "installation": { 185 | "id": 179208 186 | } 187 | } -------------------------------------------------------------------------------- /test/fixtures/release-draft.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "published", 3 | "release": { 4 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/11047034", 5 | "assets_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/11047034/assets", 6 | "upload_url": "https://uploads.github.com/repos/toolmantim/boomper-test-project/releases/11047034/assets{?name,label}", 7 | "html_url": "https://github.com/toolmantim/boomper-test-project/releases/tag/v1.0.2", 8 | "id": 11047034, 9 | "tag_name": "v1.0.2", 10 | "target_commitish": "master", 11 | "name": "v1.0.2", 12 | "draft": true, 13 | "author": { 14 | "login": "toolmantim", 15 | "id": 153, 16 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 17 | "gravatar_id": "", 18 | "url": "https://api.github.com/users/toolmantim", 19 | "html_url": "https://github.com/toolmantim", 20 | "followers_url": "https://api.github.com/users/toolmantim/followers", 21 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 22 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 23 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 24 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 25 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 26 | "repos_url": "https://api.github.com/users/toolmantim/repos", 27 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 28 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 29 | "type": "User", 30 | "site_admin": false 31 | }, 32 | "prerelease": false, 33 | "created_at": "2018-05-17T12:27:31Z", 34 | "published_at": "2018-05-17T12:45:20Z", 35 | "assets": [ 36 | { 37 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/assets/7209611", 38 | "id": 7209611, 39 | "name": "giphy.gif", 40 | "label": null, 41 | "uploader": { 42 | "login": "toolmantim", 43 | "id": 153, 44 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 45 | "gravatar_id": "", 46 | "url": "https://api.github.com/users/toolmantim", 47 | "html_url": "https://github.com/toolmantim", 48 | "followers_url": "https://api.github.com/users/toolmantim/followers", 49 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 50 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 51 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 52 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 53 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 54 | "repos_url": "https://api.github.com/users/toolmantim/repos", 55 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 56 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 57 | "type": "User", 58 | "site_admin": false 59 | }, 60 | "content_type": "image/gif", 61 | "state": "uploaded", 62 | "size": 603387, 63 | "download_count": 0, 64 | "created_at": "2018-05-17T12:44:59Z", 65 | "updated_at": "2018-05-17T12:45:16Z", 66 | "browser_download_url": "https://github.com/toolmantim/boomper-test-project/releases/download/v1.0.2/giphy.gif" 67 | } 68 | ], 69 | "tarball_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tarball/v1.0.2", 70 | "zipball_url": "https://api.github.com/repos/toolmantim/boomper-test-project/zipball/v1.0.2", 71 | "body": "" 72 | }, 73 | "repository": { 74 | "id": 133810100, 75 | "name": "boomper-test-project", 76 | "full_name": "toolmantim/boomper-test-project", 77 | "owner": { 78 | "login": "toolmantim", 79 | "id": 153, 80 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 81 | "gravatar_id": "", 82 | "url": "https://api.github.com/users/toolmantim", 83 | "html_url": "https://github.com/toolmantim", 84 | "followers_url": "https://api.github.com/users/toolmantim/followers", 85 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 86 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 87 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 88 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 89 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 90 | "repos_url": "https://api.github.com/users/toolmantim/repos", 91 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 92 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 93 | "type": "User", 94 | "site_admin": false 95 | }, 96 | "private": true, 97 | "html_url": "https://github.com/toolmantim/boomper-test-project", 98 | "description": "What a project", 99 | "fork": false, 100 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project", 101 | "forks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/forks", 102 | "keys_url": "https://api.github.com/repos/toolmantim/boomper-test-project/keys{/key_id}", 103 | "collaborators_url": "https://api.github.com/repos/toolmantim/boomper-test-project/collaborators{/collaborator}", 104 | "teams_url": "https://api.github.com/repos/toolmantim/boomper-test-project/teams", 105 | "hooks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/hooks", 106 | "issue_events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/events{/number}", 107 | "events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/events", 108 | "assignees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/assignees{/user}", 109 | "branches_url": "https://api.github.com/repos/toolmantim/boomper-test-project/branches{/branch}", 110 | "tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tags", 111 | "blobs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/blobs{/sha}", 112 | "git_tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/tags{/sha}", 113 | "git_refs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/refs{/sha}", 114 | "trees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/trees{/sha}", 115 | "statuses_url": "https://api.github.com/repos/toolmantim/boomper-test-project/statuses/{sha}", 116 | "languages_url": "https://api.github.com/repos/toolmantim/boomper-test-project/languages", 117 | "stargazers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/stargazers", 118 | "contributors_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contributors", 119 | "subscribers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscribers", 120 | "subscription_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscription", 121 | "commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/commits{/sha}", 122 | "git_commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/commits{/sha}", 123 | "comments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/comments{/number}", 124 | "issue_comment_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/comments{/number}", 125 | "contents_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contents/{+path}", 126 | "compare_url": "https://api.github.com/repos/toolmantim/boomper-test-project/compare/{base}...{head}", 127 | "merges_url": "https://api.github.com/repos/toolmantim/boomper-test-project/merges", 128 | "archive_url": "https://api.github.com/repos/toolmantim/boomper-test-project/{archive_format}{/ref}", 129 | "downloads_url": "https://api.github.com/repos/toolmantim/boomper-test-project/downloads", 130 | "issues_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues{/number}", 131 | "pulls_url": "https://api.github.com/repos/toolmantim/boomper-test-project/pulls{/number}", 132 | "milestones_url": "https://api.github.com/repos/toolmantim/boomper-test-project/milestones{/number}", 133 | "notifications_url": "https://api.github.com/repos/toolmantim/boomper-test-project/notifications{?since,all,participating}", 134 | "labels_url": "https://api.github.com/repos/toolmantim/boomper-test-project/labels{/name}", 135 | "releases_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases{/id}", 136 | "deployments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/deployments", 137 | "created_at": "2018-05-17T12:27:30Z", 138 | "updated_at": "2018-05-17T12:27:41Z", 139 | "pushed_at": "2018-05-17T12:45:20Z", 140 | "git_url": "git://github.com/toolmantim/boomper-test-project.git", 141 | "ssh_url": "git@github.com:toolmantim/boomper-test-project.git", 142 | "clone_url": "https://github.com/toolmantim/boomper-test-project.git", 143 | "svn_url": "https://github.com/toolmantim/boomper-test-project", 144 | "homepage": null, 145 | "size": 0, 146 | "stargazers_count": 0, 147 | "watchers_count": 0, 148 | "language": null, 149 | "has_issues": false, 150 | "has_projects": false, 151 | "has_downloads": true, 152 | "has_wiki": false, 153 | "has_pages": false, 154 | "forks_count": 0, 155 | "mirror_url": null, 156 | "archived": false, 157 | "open_issues_count": 0, 158 | "license": null, 159 | "forks": 0, 160 | "open_issues": 0, 161 | "watchers": 0, 162 | "default_branch": "master" 163 | }, 164 | "sender": { 165 | "login": "toolmantim", 166 | "id": 153, 167 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 168 | "gravatar_id": "", 169 | "url": "https://api.github.com/users/toolmantim", 170 | "html_url": "https://github.com/toolmantim", 171 | "followers_url": "https://api.github.com/users/toolmantim/followers", 172 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 173 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 174 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 175 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 176 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 177 | "repos_url": "https://api.github.com/users/toolmantim/repos", 178 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 179 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 180 | "type": "User", 181 | "site_admin": false 182 | }, 183 | "installation": { 184 | "id": 179208 185 | } 186 | } -------------------------------------------------------------------------------- /test/fixtures/release-old-version.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "published", 3 | "release": { 4 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/11047034", 5 | "assets_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/11047034/assets", 6 | "upload_url": "https://uploads.github.com/repos/toolmantim/boomper-test-project/releases/11047034/assets{?name,label}", 7 | "html_url": "https://github.com/toolmantim/boomper-test-project/releases/tag/v1.0.1", 8 | "id": 11047034, 9 | "tag_name": "v1.0.1", 10 | "target_commitish": "master", 11 | "name": "v1.0.1", 12 | "draft": false, 13 | "author": { 14 | "login": "toolmantim", 15 | "id": 153, 16 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 17 | "gravatar_id": "", 18 | "url": "https://api.github.com/users/toolmantim", 19 | "html_url": "https://github.com/toolmantim", 20 | "followers_url": "https://api.github.com/users/toolmantim/followers", 21 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 22 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 23 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 24 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 25 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 26 | "repos_url": "https://api.github.com/users/toolmantim/repos", 27 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 28 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 29 | "type": "User", 30 | "site_admin": false 31 | }, 32 | "prerelease": false, 33 | "created_at": "2018-05-17T12:27:31Z", 34 | "published_at": "2018-05-17T12:45:20Z", 35 | "assets": [ 36 | { 37 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/assets/7209611", 38 | "id": 7209611, 39 | "name": "giphy.gif", 40 | "label": null, 41 | "uploader": { 42 | "login": "toolmantim", 43 | "id": 153, 44 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 45 | "gravatar_id": "", 46 | "url": "https://api.github.com/users/toolmantim", 47 | "html_url": "https://github.com/toolmantim", 48 | "followers_url": "https://api.github.com/users/toolmantim/followers", 49 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 50 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 51 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 52 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 53 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 54 | "repos_url": "https://api.github.com/users/toolmantim/repos", 55 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 56 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 57 | "type": "User", 58 | "site_admin": false 59 | }, 60 | "content_type": "image/gif", 61 | "state": "uploaded", 62 | "size": 603387, 63 | "download_count": 0, 64 | "created_at": "2018-05-17T12:44:59Z", 65 | "updated_at": "2018-05-17T12:45:16Z", 66 | "browser_download_url": "https://github.com/toolmantim/boomper-test-project/releases/download/v1.0.1/giphy.gif" 67 | } 68 | ], 69 | "tarball_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tarball/v1.0.1", 70 | "zipball_url": "https://api.github.com/repos/toolmantim/boomper-test-project/zipball/v1.0.1", 71 | "body": "" 72 | }, 73 | "repository": { 74 | "id": 133810100, 75 | "name": "boomper-test-project", 76 | "full_name": "toolmantim/boomper-test-project", 77 | "owner": { 78 | "login": "toolmantim", 79 | "id": 153, 80 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 81 | "gravatar_id": "", 82 | "url": "https://api.github.com/users/toolmantim", 83 | "html_url": "https://github.com/toolmantim", 84 | "followers_url": "https://api.github.com/users/toolmantim/followers", 85 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 86 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 87 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 88 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 89 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 90 | "repos_url": "https://api.github.com/users/toolmantim/repos", 91 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 92 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 93 | "type": "User", 94 | "site_admin": false 95 | }, 96 | "private": true, 97 | "html_url": "https://github.com/toolmantim/boomper-test-project", 98 | "description": "What a project", 99 | "fork": false, 100 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project", 101 | "forks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/forks", 102 | "keys_url": "https://api.github.com/repos/toolmantim/boomper-test-project/keys{/key_id}", 103 | "collaborators_url": "https://api.github.com/repos/toolmantim/boomper-test-project/collaborators{/collaborator}", 104 | "teams_url": "https://api.github.com/repos/toolmantim/boomper-test-project/teams", 105 | "hooks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/hooks", 106 | "issue_events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/events{/number}", 107 | "events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/events", 108 | "assignees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/assignees{/user}", 109 | "branches_url": "https://api.github.com/repos/toolmantim/boomper-test-project/branches{/branch}", 110 | "tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tags", 111 | "blobs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/blobs{/sha}", 112 | "git_tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/tags{/sha}", 113 | "git_refs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/refs{/sha}", 114 | "trees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/trees{/sha}", 115 | "statuses_url": "https://api.github.com/repos/toolmantim/boomper-test-project/statuses/{sha}", 116 | "languages_url": "https://api.github.com/repos/toolmantim/boomper-test-project/languages", 117 | "stargazers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/stargazers", 118 | "contributors_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contributors", 119 | "subscribers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscribers", 120 | "subscription_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscription", 121 | "commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/commits{/sha}", 122 | "git_commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/commits{/sha}", 123 | "comments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/comments{/number}", 124 | "issue_comment_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/comments{/number}", 125 | "contents_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contents/{+path}", 126 | "compare_url": "https://api.github.com/repos/toolmantim/boomper-test-project/compare/{base}...{head}", 127 | "merges_url": "https://api.github.com/repos/toolmantim/boomper-test-project/merges", 128 | "archive_url": "https://api.github.com/repos/toolmantim/boomper-test-project/{archive_format}{/ref}", 129 | "downloads_url": "https://api.github.com/repos/toolmantim/boomper-test-project/downloads", 130 | "issues_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues{/number}", 131 | "pulls_url": "https://api.github.com/repos/toolmantim/boomper-test-project/pulls{/number}", 132 | "milestones_url": "https://api.github.com/repos/toolmantim/boomper-test-project/milestones{/number}", 133 | "notifications_url": "https://api.github.com/repos/toolmantim/boomper-test-project/notifications{?since,all,participating}", 134 | "labels_url": "https://api.github.com/repos/toolmantim/boomper-test-project/labels{/name}", 135 | "releases_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases{/id}", 136 | "deployments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/deployments", 137 | "created_at": "2018-05-17T12:27:30Z", 138 | "updated_at": "2018-05-17T12:27:41Z", 139 | "pushed_at": "2018-05-17T12:45:20Z", 140 | "git_url": "git://github.com/toolmantim/boomper-test-project.git", 141 | "ssh_url": "git@github.com:toolmantim/boomper-test-project.git", 142 | "clone_url": "https://github.com/toolmantim/boomper-test-project.git", 143 | "svn_url": "https://github.com/toolmantim/boomper-test-project", 144 | "homepage": null, 145 | "size": 0, 146 | "stargazers_count": 0, 147 | "watchers_count": 0, 148 | "language": null, 149 | "has_issues": false, 150 | "has_projects": false, 151 | "has_downloads": true, 152 | "has_wiki": false, 153 | "has_pages": false, 154 | "forks_count": 0, 155 | "mirror_url": null, 156 | "archived": false, 157 | "open_issues_count": 0, 158 | "license": null, 159 | "forks": 0, 160 | "open_issues": 0, 161 | "watchers": 0, 162 | "default_branch": "master" 163 | }, 164 | "sender": { 165 | "login": "toolmantim", 166 | "id": 153, 167 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 168 | "gravatar_id": "", 169 | "url": "https://api.github.com/users/toolmantim", 170 | "html_url": "https://github.com/toolmantim", 171 | "followers_url": "https://api.github.com/users/toolmantim/followers", 172 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 173 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 174 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 175 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 176 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 177 | "repos_url": "https://api.github.com/users/toolmantim/repos", 178 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 179 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 180 | "type": "User", 181 | "site_admin": false 182 | }, 183 | "installation": { 184 | "id": 179208 185 | } 186 | } -------------------------------------------------------------------------------- /test/fixtures/release-prerelease.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "published", 3 | "release": { 4 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/11047034", 5 | "assets_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/11047034/assets", 6 | "upload_url": "https://uploads.github.com/repos/toolmantim/boomper-test-project/releases/11047034/assets{?name,label}", 7 | "html_url": "https://github.com/toolmantim/boomper-test-project/releases/tag/v2.0.0-beta", 8 | "id": 11047034, 9 | "tag_name": "v2.0.0-beta", 10 | "target_commitish": "master", 11 | "name": "v2.0.0-beta", 12 | "draft": false, 13 | "author": { 14 | "login": "toolmantim", 15 | "id": 153, 16 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 17 | "gravatar_id": "", 18 | "url": "https://api.github.com/users/toolmantim", 19 | "html_url": "https://github.com/toolmantim", 20 | "followers_url": "https://api.github.com/users/toolmantim/followers", 21 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 22 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 23 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 24 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 25 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 26 | "repos_url": "https://api.github.com/users/toolmantim/repos", 27 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 28 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 29 | "type": "User", 30 | "site_admin": false 31 | }, 32 | "prerelease": true, 33 | "created_at": "2018-05-17T12:27:31Z", 34 | "published_at": "2018-05-17T12:45:20Z", 35 | "assets": [ 36 | { 37 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/assets/7209611", 38 | "id": 7209611, 39 | "name": "giphy.gif", 40 | "label": null, 41 | "uploader": { 42 | "login": "toolmantim", 43 | "id": 153, 44 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 45 | "gravatar_id": "", 46 | "url": "https://api.github.com/users/toolmantim", 47 | "html_url": "https://github.com/toolmantim", 48 | "followers_url": "https://api.github.com/users/toolmantim/followers", 49 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 50 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 51 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 52 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 53 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 54 | "repos_url": "https://api.github.com/users/toolmantim/repos", 55 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 56 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 57 | "type": "User", 58 | "site_admin": false 59 | }, 60 | "content_type": "image/gif", 61 | "state": "uploaded", 62 | "size": 603387, 63 | "download_count": 0, 64 | "created_at": "2018-05-17T12:44:59Z", 65 | "updated_at": "2018-05-17T12:45:16Z", 66 | "browser_download_url": "https://github.com/toolmantim/boomper-test-project/releases/download/v2.0.0-beta/giphy.gif" 67 | } 68 | ], 69 | "tarball_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tarball/v2.0.0-beta", 70 | "zipball_url": "https://api.github.com/repos/toolmantim/boomper-test-project/zipball/v2.0.0-beta", 71 | "body": "" 72 | }, 73 | "repository": { 74 | "id": 133810100, 75 | "name": "boomper-test-project", 76 | "full_name": "toolmantim/boomper-test-project", 77 | "owner": { 78 | "login": "toolmantim", 79 | "id": 153, 80 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 81 | "gravatar_id": "", 82 | "url": "https://api.github.com/users/toolmantim", 83 | "html_url": "https://github.com/toolmantim", 84 | "followers_url": "https://api.github.com/users/toolmantim/followers", 85 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 86 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 87 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 88 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 89 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 90 | "repos_url": "https://api.github.com/users/toolmantim/repos", 91 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 92 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 93 | "type": "User", 94 | "site_admin": false 95 | }, 96 | "private": true, 97 | "html_url": "https://github.com/toolmantim/boomper-test-project", 98 | "description": "What a project", 99 | "fork": false, 100 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project", 101 | "forks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/forks", 102 | "keys_url": "https://api.github.com/repos/toolmantim/boomper-test-project/keys{/key_id}", 103 | "collaborators_url": "https://api.github.com/repos/toolmantim/boomper-test-project/collaborators{/collaborator}", 104 | "teams_url": "https://api.github.com/repos/toolmantim/boomper-test-project/teams", 105 | "hooks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/hooks", 106 | "issue_events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/events{/number}", 107 | "events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/events", 108 | "assignees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/assignees{/user}", 109 | "branches_url": "https://api.github.com/repos/toolmantim/boomper-test-project/branches{/branch}", 110 | "tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tags", 111 | "blobs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/blobs{/sha}", 112 | "git_tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/tags{/sha}", 113 | "git_refs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/refs{/sha}", 114 | "trees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/trees{/sha}", 115 | "statuses_url": "https://api.github.com/repos/toolmantim/boomper-test-project/statuses/{sha}", 116 | "languages_url": "https://api.github.com/repos/toolmantim/boomper-test-project/languages", 117 | "stargazers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/stargazers", 118 | "contributors_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contributors", 119 | "subscribers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscribers", 120 | "subscription_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscription", 121 | "commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/commits{/sha}", 122 | "git_commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/commits{/sha}", 123 | "comments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/comments{/number}", 124 | "issue_comment_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/comments{/number}", 125 | "contents_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contents/{+path}", 126 | "compare_url": "https://api.github.com/repos/toolmantim/boomper-test-project/compare/{base}...{head}", 127 | "merges_url": "https://api.github.com/repos/toolmantim/boomper-test-project/merges", 128 | "archive_url": "https://api.github.com/repos/toolmantim/boomper-test-project/{archive_format}{/ref}", 129 | "downloads_url": "https://api.github.com/repos/toolmantim/boomper-test-project/downloads", 130 | "issues_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues{/number}", 131 | "pulls_url": "https://api.github.com/repos/toolmantim/boomper-test-project/pulls{/number}", 132 | "milestones_url": "https://api.github.com/repos/toolmantim/boomper-test-project/milestones{/number}", 133 | "notifications_url": "https://api.github.com/repos/toolmantim/boomper-test-project/notifications{?since,all,participating}", 134 | "labels_url": "https://api.github.com/repos/toolmantim/boomper-test-project/labels{/name}", 135 | "releases_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases{/id}", 136 | "deployments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/deployments", 137 | "created_at": "2018-05-17T12:27:30Z", 138 | "updated_at": "2018-05-17T12:27:41Z", 139 | "pushed_at": "2018-05-17T12:45:20Z", 140 | "git_url": "git://github.com/toolmantim/boomper-test-project.git", 141 | "ssh_url": "git@github.com:toolmantim/boomper-test-project.git", 142 | "clone_url": "https://github.com/toolmantim/boomper-test-project.git", 143 | "svn_url": "https://github.com/toolmantim/boomper-test-project", 144 | "homepage": null, 145 | "size": 0, 146 | "stargazers_count": 0, 147 | "watchers_count": 0, 148 | "language": null, 149 | "has_issues": false, 150 | "has_projects": false, 151 | "has_downloads": true, 152 | "has_wiki": false, 153 | "has_pages": false, 154 | "forks_count": 0, 155 | "mirror_url": null, 156 | "archived": false, 157 | "open_issues_count": 0, 158 | "license": null, 159 | "forks": 0, 160 | "open_issues": 0, 161 | "watchers": 0, 162 | "default_branch": "master" 163 | }, 164 | "sender": { 165 | "login": "toolmantim", 166 | "id": 153, 167 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 168 | "gravatar_id": "", 169 | "url": "https://api.github.com/users/toolmantim", 170 | "html_url": "https://github.com/toolmantim", 171 | "followers_url": "https://api.github.com/users/toolmantim/followers", 172 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 173 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 174 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 175 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 176 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 177 | "repos_url": "https://api.github.com/users/toolmantim/repos", 178 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 179 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 180 | "type": "User", 181 | "site_admin": false 182 | }, 183 | "installation": { 184 | "id": 179208 185 | } 186 | } -------------------------------------------------------------------------------- /test/fixtures/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "published", 3 | "release": { 4 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/11047034", 5 | "assets_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/11047034/assets", 6 | "upload_url": "https://uploads.github.com/repos/toolmantim/boomper-test-project/releases/11047034/assets{?name,label}", 7 | "html_url": "https://github.com/toolmantim/boomper-test-project/releases/tag/v1.0.2", 8 | "id": 11047034, 9 | "tag_name": "v1.0.2", 10 | "target_commitish": "master", 11 | "name": "v1.0.2", 12 | "draft": false, 13 | "author": { 14 | "login": "toolmantim", 15 | "id": 153, 16 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 17 | "gravatar_id": "", 18 | "url": "https://api.github.com/users/toolmantim", 19 | "html_url": "https://github.com/toolmantim", 20 | "followers_url": "https://api.github.com/users/toolmantim/followers", 21 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 22 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 23 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 24 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 25 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 26 | "repos_url": "https://api.github.com/users/toolmantim/repos", 27 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 28 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 29 | "type": "User", 30 | "site_admin": false 31 | }, 32 | "prerelease": false, 33 | "created_at": "2018-05-17T12:27:31Z", 34 | "published_at": "2018-05-17T12:45:20Z", 35 | "assets": [ 36 | { 37 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases/assets/7209611", 38 | "id": 7209611, 39 | "name": "giphy.gif", 40 | "label": null, 41 | "uploader": { 42 | "login": "toolmantim", 43 | "id": 153, 44 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 45 | "gravatar_id": "", 46 | "url": "https://api.github.com/users/toolmantim", 47 | "html_url": "https://github.com/toolmantim", 48 | "followers_url": "https://api.github.com/users/toolmantim/followers", 49 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 50 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 51 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 52 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 53 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 54 | "repos_url": "https://api.github.com/users/toolmantim/repos", 55 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 56 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 57 | "type": "User", 58 | "site_admin": false 59 | }, 60 | "content_type": "image/gif", 61 | "state": "uploaded", 62 | "size": 603387, 63 | "download_count": 0, 64 | "created_at": "2018-05-17T12:44:59Z", 65 | "updated_at": "2018-05-17T12:45:16Z", 66 | "browser_download_url": "https://github.com/toolmantim/boomper-test-project/releases/download/v1.0.2/giphy.gif" 67 | } 68 | ], 69 | "tarball_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tarball/v1.0.2", 70 | "zipball_url": "https://api.github.com/repos/toolmantim/boomper-test-project/zipball/v1.0.2", 71 | "body": "" 72 | }, 73 | "repository": { 74 | "id": 133810100, 75 | "name": "boomper-test-project", 76 | "full_name": "toolmantim/boomper-test-project", 77 | "owner": { 78 | "login": "toolmantim", 79 | "id": 153, 80 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 81 | "gravatar_id": "", 82 | "url": "https://api.github.com/users/toolmantim", 83 | "html_url": "https://github.com/toolmantim", 84 | "followers_url": "https://api.github.com/users/toolmantim/followers", 85 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 86 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 87 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 88 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 89 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 90 | "repos_url": "https://api.github.com/users/toolmantim/repos", 91 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 92 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 93 | "type": "User", 94 | "site_admin": false 95 | }, 96 | "private": true, 97 | "html_url": "https://github.com/toolmantim/boomper-test-project", 98 | "description": "What a project", 99 | "fork": false, 100 | "url": "https://api.github.com/repos/toolmantim/boomper-test-project", 101 | "forks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/forks", 102 | "keys_url": "https://api.github.com/repos/toolmantim/boomper-test-project/keys{/key_id}", 103 | "collaborators_url": "https://api.github.com/repos/toolmantim/boomper-test-project/collaborators{/collaborator}", 104 | "teams_url": "https://api.github.com/repos/toolmantim/boomper-test-project/teams", 105 | "hooks_url": "https://api.github.com/repos/toolmantim/boomper-test-project/hooks", 106 | "issue_events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/events{/number}", 107 | "events_url": "https://api.github.com/repos/toolmantim/boomper-test-project/events", 108 | "assignees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/assignees{/user}", 109 | "branches_url": "https://api.github.com/repos/toolmantim/boomper-test-project/branches{/branch}", 110 | "tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/tags", 111 | "blobs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/blobs{/sha}", 112 | "git_tags_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/tags{/sha}", 113 | "git_refs_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/refs{/sha}", 114 | "trees_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/trees{/sha}", 115 | "statuses_url": "https://api.github.com/repos/toolmantim/boomper-test-project/statuses/{sha}", 116 | "languages_url": "https://api.github.com/repos/toolmantim/boomper-test-project/languages", 117 | "stargazers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/stargazers", 118 | "contributors_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contributors", 119 | "subscribers_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscribers", 120 | "subscription_url": "https://api.github.com/repos/toolmantim/boomper-test-project/subscription", 121 | "commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/commits{/sha}", 122 | "git_commits_url": "https://api.github.com/repos/toolmantim/boomper-test-project/git/commits{/sha}", 123 | "comments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/comments{/number}", 124 | "issue_comment_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues/comments{/number}", 125 | "contents_url": "https://api.github.com/repos/toolmantim/boomper-test-project/contents/{+path}", 126 | "compare_url": "https://api.github.com/repos/toolmantim/boomper-test-project/compare/{base}...{head}", 127 | "merges_url": "https://api.github.com/repos/toolmantim/boomper-test-project/merges", 128 | "archive_url": "https://api.github.com/repos/toolmantim/boomper-test-project/{archive_format}{/ref}", 129 | "downloads_url": "https://api.github.com/repos/toolmantim/boomper-test-project/downloads", 130 | "issues_url": "https://api.github.com/repos/toolmantim/boomper-test-project/issues{/number}", 131 | "pulls_url": "https://api.github.com/repos/toolmantim/boomper-test-project/pulls{/number}", 132 | "milestones_url": "https://api.github.com/repos/toolmantim/boomper-test-project/milestones{/number}", 133 | "notifications_url": "https://api.github.com/repos/toolmantim/boomper-test-project/notifications{?since,all,participating}", 134 | "labels_url": "https://api.github.com/repos/toolmantim/boomper-test-project/labels{/name}", 135 | "releases_url": "https://api.github.com/repos/toolmantim/boomper-test-project/releases{/id}", 136 | "deployments_url": "https://api.github.com/repos/toolmantim/boomper-test-project/deployments", 137 | "created_at": "2018-05-17T12:27:30Z", 138 | "updated_at": "2018-05-17T12:27:41Z", 139 | "pushed_at": "2018-05-17T12:45:20Z", 140 | "git_url": "git://github.com/toolmantim/boomper-test-project.git", 141 | "ssh_url": "git@github.com:toolmantim/boomper-test-project.git", 142 | "clone_url": "https://github.com/toolmantim/boomper-test-project.git", 143 | "svn_url": "https://github.com/toolmantim/boomper-test-project", 144 | "homepage": null, 145 | "size": 0, 146 | "stargazers_count": 0, 147 | "watchers_count": 0, 148 | "language": null, 149 | "has_issues": false, 150 | "has_projects": false, 151 | "has_downloads": true, 152 | "has_wiki": false, 153 | "has_pages": false, 154 | "forks_count": 0, 155 | "mirror_url": null, 156 | "archived": false, 157 | "open_issues_count": 0, 158 | "license": null, 159 | "forks": 0, 160 | "open_issues": 0, 161 | "watchers": 0, 162 | "default_branch": "master" 163 | }, 164 | "sender": { 165 | "login": "toolmantim", 166 | "id": 153, 167 | "avatar_url": "https://avatars3.githubusercontent.com/u/153?v=4", 168 | "gravatar_id": "", 169 | "url": "https://api.github.com/users/toolmantim", 170 | "html_url": "https://github.com/toolmantim", 171 | "followers_url": "https://api.github.com/users/toolmantim/followers", 172 | "following_url": "https://api.github.com/users/toolmantim/following{/other_user}", 173 | "gists_url": "https://api.github.com/users/toolmantim/gists{/gist_id}", 174 | "starred_url": "https://api.github.com/users/toolmantim/starred{/owner}{/repo}", 175 | "subscriptions_url": "https://api.github.com/users/toolmantim/subscriptions", 176 | "organizations_url": "https://api.github.com/users/toolmantim/orgs", 177 | "repos_url": "https://api.github.com/users/toolmantim/repos", 178 | "events_url": "https://api.github.com/users/toolmantim/events{/privacy}", 179 | "received_events_url": "https://api.github.com/users/toolmantim/received_events", 180 | "type": "User", 181 | "site_admin": false 182 | }, 183 | "installation": { 184 | "id": 179208 185 | } 186 | } -------------------------------------------------------------------------------- /test/helpers/mock-responses.js: -------------------------------------------------------------------------------- 1 | const crypto = require('crypto') 2 | const fs = require('fs') 3 | const { encodeContent } = require('../../lib/base46') 4 | 5 | const mockError = (code) => { 6 | const err = new Error('Not found') 7 | err.code = code 8 | throw err 9 | } 10 | 11 | const mockContent = (content) => { 12 | return { 13 | content: encodeContent(content), 14 | sha: crypto.createHash('sha1').update(content).digest('hex') 15 | } 16 | } 17 | 18 | const mockConfig = (yamlFilePath) => { 19 | return mockContent(fs.readFileSync(`${__dirname}/../fixtures/${yamlFilePath}`)) 20 | } 21 | 22 | module.exports = { 23 | mockError, 24 | mockContent, 25 | mockConfig 26 | } 27 | -------------------------------------------------------------------------------- /test/index.test.js: -------------------------------------------------------------------------------- 1 | const nock = require('nock') 2 | const { Probot, ProbotOctokit } = require('probot') 3 | 4 | const { mockConfig, mockContent } = require('./helpers/mock-responses') 5 | const boomper = require('../index') 6 | 7 | describe('boomper', () => { 8 | let probot 9 | 10 | beforeEach(() => { 11 | nock.disableNetConnect() 12 | 13 | probot = new Probot({ 14 | id: 1, 15 | githubToken: 'test', 16 | Octokit: ProbotOctokit.defaults({ 17 | retry: { enabled: false }, 18 | throttle: { enabled: false } 19 | }) 20 | }) 21 | 22 | probot.load(boomper) 23 | }) 24 | 25 | describe('release', () => { 26 | describe('without a config', () => { 27 | it('does nothing', async () => { 28 | const mock = nock('https://api.github.com') 29 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 30 | .reply(404) 31 | .get('/repos/toolmantim/.github/contents/.github%2Fboomper.yml') 32 | .reply(404) 33 | 34 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 35 | 36 | expect(mock.activeMocks()).toStrictEqual([]) 37 | }) 38 | }) 39 | 40 | describe('with a config', () => { 41 | describe('with no releases', () => { 42 | it('does nothing', async () => { 43 | const mock = nock('https://api.github.com') 44 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 45 | .reply(200, mockConfig('config.yml')) 46 | .get('/repos/toolmantim/boomper-test-project/releases') 47 | .reply(200, []) 48 | 49 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 50 | 51 | expect(mock.activeMocks()).toStrictEqual([]) 52 | }) 53 | }) 54 | 55 | describe('with a draft release', () => { 56 | it('does nothing', async () => { 57 | const mock = nock('https://api.github.com') 58 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 59 | .reply(200, mockConfig('config.yml')) 60 | .get('/repos/toolmantim/boomper-test-project/releases') 61 | .reply(200, [require('./fixtures/release-draft').release]) 62 | 63 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 64 | 65 | expect(mock.activeMocks()).toStrictEqual([]) 66 | }) 67 | }) 68 | 69 | describe('with a release', () => { 70 | it('updates the files', async () => { 71 | const release = require('./fixtures/release').release 72 | const oldRelease = require('./fixtures/release-old-version').release 73 | 74 | const mock = nock('https://api.github.com') 75 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 76 | .reply(200, mockConfig('config.yml')) 77 | .get('/repos/toolmantim/boomper-test-project/releases') 78 | .reply(200, [oldRelease, release]) 79 | .get('/repos/toolmantim/boomper-test-project/contents/README.md') 80 | .reply(200, mockContent(` 81 | # Some project 82 | https://download.com/v0.0.1/file.zip 83 | https://download.com/v1.0.0/file.zip`)) 84 | .put('/repos/toolmantim/boomper-test-project/contents/README.md', (body) => { 85 | expect(body).toEqual({ 86 | content: 'CiMgU29tZSBwcm9qZWN0Cmh0dHBzOi8vZG93bmxvYWQuY29tL3YxLjAuMi9maWxlLnppcApodHRwczovL2Rvd25sb2FkLmNvbS92MS4wLjIvZmlsZS56aXA=', 87 | message: 'Bump README.md for v1.0.2 release', 88 | sha: 'dcef71f84be19369d04d41c2a898b32c900320dc' 89 | }) 90 | return true 91 | }) 92 | .reply(201, {}) 93 | 94 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 95 | 96 | expect(mock.activeMocks()).toStrictEqual([]) 97 | }) 98 | 99 | describe('with a config file with skipCi', () => { 100 | it('updates the files', async () => { 101 | const release = require('./fixtures/release').release 102 | const oldRelease = require('./fixtures/release-old-version').release 103 | 104 | const mock = nock('https://api.github.com') 105 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 106 | .reply(200, mockConfig('config-with-skip-ci.yml')) 107 | .get('/repos/toolmantim/boomper-test-project/releases') 108 | .reply(200, [oldRelease, release]) 109 | .get('/repos/toolmantim/boomper-test-project/contents/README.md') 110 | .reply(200, mockContent(` 111 | # Some project 112 | https://download.com/v0.0.1/file.zip 113 | https://download.com/v1.0.0/file.zip`)) 114 | .put('/repos/toolmantim/boomper-test-project/contents/README.md', (body) => { 115 | expect(body).toEqual({ 116 | content: 'CiAgIyBTb21lIHByb2plY3QKICBodHRwczovL2Rvd25sb2FkLmNvbS92MS4wLjIvZmlsZS56aXAKICBodHRwczovL2Rvd25sb2FkLmNvbS92MS4wLjIvZmlsZS56aXA=', 117 | message: 'Bump README.md for v1.0.2 release [skip ci]', 118 | sha: '3b54dab859e79dd0f2548039ababb44f33cae4ea' 119 | }) 120 | return true 121 | }) 122 | .reply(201, {}) 123 | 124 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 125 | 126 | expect(mock.activeMocks()).toStrictEqual([]) 127 | }) 128 | }) 129 | }) 130 | 131 | describe('with an already updated readme', () => { 132 | it('does nothing', async () => { 133 | const release = require('./fixtures/release').release 134 | 135 | const mock = nock('https://api.github.com') 136 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 137 | .reply(200, mockConfig('config.yml')) 138 | .get('/repos/toolmantim/boomper-test-project/releases') 139 | .reply(200, [release]) 140 | .get('/repos/toolmantim/boomper-test-project/contents/README.md') 141 | .reply(200, mockContent('# Some project\nhttps://download.com/v1.0.2/file.zip')) 142 | 143 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 144 | 145 | expect(mock.activeMocks()).toStrictEqual([]) 146 | }) 147 | }) 148 | 149 | describe('with a pre-release', () => { 150 | it('does nothing', async () => { 151 | const prerelease = require('./fixtures/release-prerelease').release 152 | 153 | const mock = nock('https://api.github.com') 154 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 155 | .reply(200, mockConfig('config.yml')) 156 | .get('/repos/toolmantim/boomper-test-project/releases') 157 | .reply(200, [prerelease]) 158 | 159 | await probot.receive({ name: 'release', payload: require('./fixtures/release-prerelease') }) 160 | 161 | expect(mock.activeMocks()).toStrictEqual([]) 162 | }) 163 | }) 164 | 165 | describe('with a config file missing .updates', () => { 166 | it('does nothing', async () => { 167 | const mock = nock('https://api.github.com') 168 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 169 | .reply(200, mockConfig('config-no-updates.yml')) 170 | 171 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 172 | 173 | expect(mock.activeMocks()).toStrictEqual([]) 174 | }) 175 | }) 176 | 177 | describe('with a config file missing .updates.path', () => { 178 | it('does nothing', async () => { 179 | const mock = nock('https://api.github.com') 180 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 181 | .reply(200, mockConfig('config-updates-no-path.yml')) 182 | .get('/repos/toolmantim/boomper-test-project/releases') 183 | .reply(200, [require('./fixtures/release')]) 184 | 185 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 186 | 187 | expect(mock.activeMocks()).toStrictEqual([]) 188 | }) 189 | }) 190 | 191 | describe('with a config file missing .updates.pattern', () => { 192 | it('does nothing', async () => { 193 | const mock = nock('https://api.github.com') 194 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 195 | .reply(200, mockConfig('config-updates-no-pattern.yml')) 196 | .get('/repos/toolmantim/boomper-test-project/releases') 197 | .reply(200, [require('./fixtures/release')]) 198 | 199 | await probot.receive({ name: 'release', payload: require('./fixtures/release') }) 200 | 201 | expect(mock.activeMocks()).toStrictEqual([]) 202 | }) 203 | }) 204 | }) 205 | }) 206 | 207 | describe('push', () => { 208 | describe('to a non-config file', () => { 209 | it('does nothing', async () => { 210 | await probot.receive({ name: 'push', payload: require('./fixtures/push-unrelated-change') }) 211 | }) 212 | }) 213 | 214 | describe('to a non-master branch', () => { 215 | it('does nothing', async () => { 216 | const mock = nock('https://api.github.com') 217 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 218 | .reply(200, mockConfig('config.yml')) 219 | 220 | await probot.receive({ name: 'push', payload: require('./fixtures/push-non-master-branch') }) 221 | 222 | expect(mock.activeMocks()).toStrictEqual([]) 223 | }) 224 | 225 | describe('when configured with the branch', () => { 226 | it('updates the files', async () => { 227 | const release = require('./fixtures/release').release 228 | 229 | const mock = nock('https://api.github.com') 230 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 231 | .reply(200, mockConfig('config-with-non-master-branch.yml')) 232 | .get('/repos/toolmantim/boomper-test-project/releases') 233 | .reply(200, [release]) 234 | .get('/repos/toolmantim/boomper-test-project/contents/README.md') 235 | .reply(200, mockContent('# Some project\nhttps://download.com/v0.0.1/file.zip')) 236 | .put('/repos/toolmantim/boomper-test-project/contents/README.md', (body) => { 237 | expect(body).toEqual({ 238 | message: 'Bump README.md for v1.0.2 release', 239 | content: 'IyBTb21lIHByb2plY3QKaHR0cHM6Ly9kb3dubG9hZC5jb20vdjEuMC4yL2ZpbGUuemlw', 240 | sha: '69c1bd14603c5afdb307d3dc332381037cbe4b1b' 241 | }) 242 | return true 243 | }) 244 | .reply(201, {}) 245 | 246 | await probot.receive({ name: 'push', payload: require('./fixtures/push-non-master-branch') }) 247 | 248 | expect(mock.activeMocks()).toStrictEqual([]) 249 | }) 250 | }) 251 | }) 252 | 253 | describe('modifying .github/boomper.yml', () => { 254 | it('updates the files', async () => { 255 | const release = require('./fixtures/release').release 256 | 257 | const mock = nock('https://api.github.com') 258 | .get('/repos/toolmantim/boomper-test-project/contents/.github%2Fboomper.yml') 259 | .reply(200, mockConfig('config.yml')) 260 | .get('/repos/toolmantim/boomper-test-project/releases') 261 | .reply(200, [release]) 262 | .get('/repos/toolmantim/boomper-test-project/contents/README.md') 263 | .reply(200, mockContent('# Some project\nhttps://download.com/v0.0.1/file.zip')) 264 | .put('/repos/toolmantim/boomper-test-project/contents/README.md', (body) => { 265 | expect(body).toEqual({ 266 | message: 'Bump README.md for v1.0.2 release', 267 | content: 'IyBTb21lIHByb2plY3QKaHR0cHM6Ly9kb3dubG9hZC5jb20vdjEuMC4yL2ZpbGUuemlw', 268 | sha: '69c1bd14603c5afdb307d3dc332381037cbe4b1b' 269 | }) 270 | return true 271 | }) 272 | .reply(201, {}) 273 | 274 | await probot.receive({ name: 'push', payload: require('./fixtures/push-config-change') }) 275 | 276 | expect(mock.activeMocks()).toStrictEqual([]) 277 | }) 278 | }) 279 | }) 280 | 281 | afterEach(() => { 282 | nock.cleanAll() 283 | nock.enableNetConnect() 284 | }) 285 | }) 286 | -------------------------------------------------------------------------------- /test/pattern-replace.test.js: -------------------------------------------------------------------------------- 1 | const patternReplace = require('../lib/pattern-replace') 2 | 3 | describe('patternReplace', () => { 4 | it('replaces versions in stuff', () => { 5 | const content = ` 6 | # boomper-test-project 7 | 8 | steps: 9 | - plugins: 10 | boomper#v1.0.0: ~ 11 | ` 12 | 13 | expect(patternReplace({ content, version: 'v2.0.0', pattern: 'boomper#(.*):' })).toEqual(` 14 | # boomper-test-project 15 | 16 | steps: 17 | - plugins: 18 | boomper#v2.0.0: ~ 19 | `) 20 | }) 21 | }) 22 | --------------------------------------------------------------------------------