{"id":15048481,"url":"https://github.com/masutaka/circleci-bundle-update-pr","last_synced_at":"2026-01-02T10:13:27.594Z","repository":{"id":27271147,"uuid":"30744076","full_name":"masutaka/circleci-bundle-update-pr","owner":"masutaka","description":"Provide continues bundle update using CircleCI","archived":false,"fork":false,"pushed_at":"2025-05-01T10:11:07.000Z","size":459,"stargazers_count":119,"open_issues_count":4,"forks_count":19,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-01T11:23:29.973Z","etag":null,"topics":["circleci","github","ruby-gem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masutaka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-02-13T06:44:42.000Z","updated_at":"2025-04-01T12:47:36.000Z","dependencies_parsed_at":"2023-10-01T12:33:05.430Z","dependency_job_id":"a74477c4-077d-41e9-8357-28a470216496","html_url":"https://github.com/masutaka/circleci-bundle-update-pr","commit_stats":{"total_commits":428,"total_committers":22,"mean_commits":"19.454545454545453","dds":"0.32242990654205606","last_synced_commit":"74c5619a94e81a46ba85d9347e24bcedeb8bef53"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masutaka%2Fcircleci-bundle-update-pr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masutaka%2Fcircleci-bundle-update-pr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masutaka%2Fcircleci-bundle-update-pr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masutaka%2Fcircleci-bundle-update-pr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masutaka","download_url":"https://codeload.github.com/masutaka/circleci-bundle-update-pr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394724,"owners_count":22063984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circleci","github","ruby-gem"],"created_at":"2024-09-24T21:13:23.757Z","updated_at":"2026-01-02T10:13:27.588Z","avatar_url":"https://github.com/masutaka.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Circleci::Bundle::Update::Pr\n\n[![CircleCI Status](https://img.shields.io/circleci/build/github/masutaka/circleci-bundle-update-pr/main?style=flat-square\u0026logo=circieci\u0026label=CircleCI)][circleci]\n[![CodeQL Status](https://img.shields.io/github/actions/workflow/status/masutaka/circleci-bundle-update-pr/github-code-scanning%2Fcodeql?branch=main\u0026style=flat-square\u0026logo=githubactions\u0026label=CodeQL)][codeql]\n[![Gem Version](https://img.shields.io/gem/v/circleci-bundle-update-pr?style=flat-square\u0026logo=rubygems\u0026label=Gem)][gem]\n[![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/masutaka/circleci-bundle-update-pr)][coderabbit]\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)][deepwiki]\n\n[circleci]: https://app.circleci.com/pipelines/github/masutaka/circleci-bundle-update-pr?branch=main\n[codeql]: https://github.com/masutaka/circleci-bundle-update-pr/actions/workflows/github-code-scanning/codeql?query=branch%3Amain\n[gem]: https://rubygems.org/gems/circleci-bundle-update-pr\n[coderabbit]: https://www.coderabbit.ai/\n[deepwiki]: https://deepwiki.com/masutaka/circleci-bundle-update-pr\n\n`circleci-bundle-update-pr` is an automation script for continuous bundle update and for sending a pull request using [`Scheduling a Workflow of CircleCI`](https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow).\n\nBy requesting a nightly build to CircleCI with an environment variable configured in `circle.yml` or `.circleci/config.yml` to execute this script, bundle update is invoked, then commit changes and send a pull request to GitHub repository if there some changes exist.\n\n## Installation\n\n```\n$ gem install circleci-bundle-update-pr\n```\n\n## Prerequisites\n\nThe application on which you want to run continuous bundle update must be configured to be built on CircleCI.\n\n## Usage\n\n### Setting GitHub personal access token to CircleCI\n\nGitHub personal access token is required for sending pull requests to your repository.\n\n1. Go to [your account's settings page](https://github.com/settings/tokens) and generate a personal access token with \"repo\" scope\n2. On CircleCI dashboard, go to your application's \"Project Settings\" -\u003e \"Environment Variables\"\n3. Add an environment variable `GITHUB_ACCESS_TOKEN` with your GitHub personal access token\n    * If use GitHub Enterprise\n        * `ENTERPRISE_OCTOKIT_ACCESS_TOKEN` with your GitHub Enterprise personal access token\n        * `ENTERPRISE_OCTOKIT_API_ENDPOINT` with your GitHub Enterprise api endpoint (e.g. https://www.example.com/api/v3)\n\n### Configure circle.yml\n\nConfigure your `circle.yml` or `.circleci/config.yml` to run `circleci-bundle-update-pr`, for example:\n\n```yaml\nversion: 2\njobs:\n  build:\n    # snip\n  continuous_bundle_update:\n    docker:\n      - image: ruby:3.0.1-alpine\n    working_directory: /work\n    steps:\n      - run:\n          name: Install System Dependencies\n          command: |\n            # See also https://circleci.com/docs/2.0/custom-images/#required-tools-for-primary-containers\n            apk add --update --no-cache git openssh-client tar gzip ca-certificates \\\n              tzdata\n            gem install -N bundler\n      - run:\n          name: Set timezone to Asia/Tokyo\n          command: cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime\n      - checkout\n      - restore_cache:\n          name: Restore bundler cache\n          keys:\n            - gems-{{ .Environment.COMMON_CACHE_KEY }}-{{ checksum \"Gemfile.lock\" }}\n            - gems-{{ .Environment.COMMON_CACHE_KEY }}-\n      - run:\n          name: Setup requirements for continuous bundle update\n          command: gem install -N circleci-bundle-update-pr\n      - deploy:\n          name: Continuous bundle update\n          command: circleci-bundle-update-pr \u003cusername\u003e \u003cemail\u003e\n\nworkflows:\n  version: 2\n  build:\n    jobs:\n      - build:\n          # snip\n  nightly:\n    triggers:\n      - schedule:\n          cron: \"00 10 * * 5\"\n          filters:\n            branches:\n              only: main\n    jobs:\n      - continuous_bundle_update\n```\n\nNOTE: Please make sure you replace `\u003cusername\u003e` and `\u003cemail\u003e` with yours.\n\n`circleci-bundle-update-pr` regularly updates myself. See also [.circleci/config.yml](.circleci/config.yml).\n\n## CLI command references\n\nGeneral usage:\n\n```\n$ circleci-bundle-update-pr \u003cgit username\u003e \u003cgit email address\u003e\n```\n\nBy default, it works only on master or main branches, but you can also explicitly specify any branches rather than only these branches by adding them to the arguments.\n\n```\n$ circleci-bundle-update-pr \u003cgit username\u003e \u003cgit email address\u003e main develop topic\n```\n\nYou can also add the following options:\n\n```\n$ circleci-bundle-update-pr -h\nUsage: circleci-bundle-update-pr [options]\n    -a, --assignees alice,bob,carol  Assign the PR to them\n    -r, --reviewers alice,bob,carol  Request PR review to them\n    -l, --labels \"In Review, Update\" Add labels to the PR\n    -d, --duplicate                  Make PR even if it has already existed\n```\n\n## Tips\n\n### Customize PR description\n\nIf `.circleci/BUNDLE_UPDATE_NOTE.md` exists, the content will be appended to PR description.\n\ne.g. `.circleci/BUNDLE_UPDATE_NOTE.md` is the below.\n\n```\n## Notice\n\n* example1\n* example2\n```\n\nPR description will be created as the below.\n\n```\n**Updated RubyGems:**\n\n* [ ] [octokit](https://github.com/octokit/octokit.rb): [`4.9.0...4.10.0`](https://github.com/octokit/octokit.rb/compare/v4.9.0...v4.10.0)\n* [ ] [public_suffix](https://github.com/weppos/publicsuffix-ruby): [`3.0.2...3.0.3`](https://github.com/weppos/publicsuffix-ruby/compare/v3.0.2...v3.0.3)\n\nPowered by [circleci-bundle-update-pr](https://rubygems.org/gems/circleci-bundle-update-pr)\n\n---\n\n## Notice\n\n* example1\n* example2\n```\n\n`.circleci/BUNDLE_UPDATE_NOTE.md` or `CIRCLECI_BUNDLE_UPDATE_NOTE.md`, either one is OK. It gives priority `.circleci/BUNDLE_UPDATE_NOTE.md` over `CIRCLECI_BUNDLE_UPDATE_NOTE.md`.\n\n### Run on GitHub Actions\n\n\u003e [!WARNING]\n\u003e GitHub Actions are NOT officially supported. This is just a tip.\n\nConfigure your `.github/workflows/bundle-update-pr.yml` to run circleci-bundle-update-pr, for example:\n\n```yaml\nname: bundle-update-pr\n\non:\n  schedule:\n    - cron: \"00 10 * * 5\" # JST 19:00 (Fri)\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v5\n\n      - name: Set up Ruby\n        uses: ruby/setup-ruby@v1\n        with:\n          ruby-version: '3.4'\n\n      - name: Install dependencies\n        run: |\n          set -x\n          gem install -N bundler circleci-bundle-update-pr\n\n      - name: Set timezone to Asia/Tokyo\n        run: |\n          set -x\n          cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime\n\n      - name: run circleci-bundle-update-pr\n        run: |\n          set -x\n\n          export CIRCLE_BRANCH=$(echo $GITHUB_REF | sed -e 's!refs/heads/!!g')\n          export CIRCLE_PROJECT_USERNAME=$(echo $GITHUB_REPOSITORY | cut -d \"/\" -f 1)\n          export CIRCLE_PROJECT_REPONAME=$(echo $GITHUB_REPOSITORY | cut -d \"/\" -f 2)\n\n          git checkout -b $CIRCLE_BRANCH\n\n          circleci-bundle-update-pr \"${GIT_USER_NAME}\" \"${GIT_USER_EMAIL}\"\n        env:\n          GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          GIT_USER_NAME:       \"your name\"\n          GIT_USER_EMAIL:      \"ci@example.com\"\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/masutaka/circleci-bundle-update-pr/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n\u003ca href=\"https://github.com/masutaka/circleci-bundle-update-pr/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=masutaka/circleci-bundle-update-pr\" /\u003e\n\u003c/a\u003e\n\n*Made with [contrib.rocks](https://contrib.rocks).*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasutaka%2Fcircleci-bundle-update-pr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasutaka%2Fcircleci-bundle-update-pr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasutaka%2Fcircleci-bundle-update-pr/lists"}