Git Product home page Git Product logo

bulk-merger's Introduction

Bulk merger

Bulk merge Pull Requests for GOV.UK repos.

Setup

Create a "Personal access token", with at least the repo/public_repo scope. Add your token with repo access to .env:

export GITHUB_TOKEN=<yourtoken>

The scripts will use this token to talk to GitHub.

Bulk approve PRs

./review gds-api-adapters

This looks for unreviewed PRs in alphagov with "gds-api-adapters" in the title. If it finds any, it will list them out and ask you to confirm if you want to approve them.

Use this command for third-party libraries that need a second GOV.UK reviewer.

@tijmenb ~/govuk/bulk-merger on master $ ./review gds-api-adapters
Searching for PRs containing 'gds-api-adapters'
Found 3 unreviewed PRs:

- 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/short-url-manager/pull/262)
- 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/local-links-manager/pull/328)
- 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/email-alert-service/pull/205)

Have you reviewed the changes, and you want to approve all these PRs? [y/N]
y
OK! Approving away...
Reviewing PR 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/short-url-manager/pull/262) ✅
Reviewing PR 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/local-links-manager/pull/328) ✅
Reviewing PR 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/email-alert-service/pull/205) ✅

Approve & merge all Pull Requests

./merge govuk_publishing_components

This will run the ./review script above, but also merge the approved PRs.

Because all repos have branch protection turned on, you won't be able to merge PRs that haven't passed on CI.

Found 4 reviewed but unmerged PRs:

- 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/short-url-manager/pull/262)
- 'Bump gds-api-adapters from 53.1.0 to 54.0.0' (https://github.com/alphagov/frontend/pull/1658)
- 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/local-links-manager/pull/328)
- 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/email-alert-service/pull/205)

Have you reviewed the changes, and you want to MERGE all these PRs? [y/N]
y
OK! Approving away...
Merging PR 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/short-url-manager/pull/262) ❌ Failed to merge: "PUT https://api.github.com/repos/alphagov/short-url-manager/pulls/262/merge: 405 - Required status check \"continuous-integration/jenkins/branch\" is errored. // See: https://help.github.com/articles/about-protected-branches"
Merging PR 'Bump gds-api-adapters from 53.1.0 to 54.0.0' (https://github.com/alphagov/frontend/pull/1658) ❌ Failed to merge: "PUT https://api.github.com/repos/alphagov/frontend/pulls/1658/merge: 405 - 2 of 2 required status checks have not succeeded: 1 expected and 1 pending. // See: https://help.github.com/articles/about-protected-branches"
Merging PR 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/local-links-manager/pull/328) ✅
Merging PR 'Bump gds-api-adapters from 53.2.0 to 54.0.0' (https://github.com/alphagov/email-alert-service/pull/205) ✅

Licence

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.