circleci-bundle-update-pr 5.2.8 → 5.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95268d03936c93f4677fd5d8c29a577f5e79bfb583d8ee16a8e35476ad49fef7
4
- data.tar.gz: 07f88ec490bc614f8039f5f4659b0d64679edc7064fa84a86f4ac4c2afa3a84a
3
+ metadata.gz: d53e60c1b641d767d3a564b3197fcdae60c861b48662332268c34bdf33e32484
4
+ data.tar.gz: e45b1064a629779fa621cff100b46f4bd065c6d26c4457b4953dce817bbd239c
5
5
  SHA512:
6
- metadata.gz: 2e4d77c59301a882f0afdaef9bbbe1b95a84096ab20a958b82e5fe59770a8255c5bd98b281945f01759bf924e4ef5ef382b26370fe8430e262c74ed61535a106
7
- data.tar.gz: f52f1e6c651acb681810eec167ec7ab9c1e04cddf15482f70b4129075553e9a483f6b42e5110cbbc36692888bae81e1c24ef0337c63ba64507863078702d5900
6
+ metadata.gz: 7239d9451e40ce0ea4ef24ec3e884e193d5919ae44babaa283318e1e34dddd35c37432f0739873442c59a7e0ffb206473b0fecf85cad4d481b718f79484834f6
7
+ data.tar.gz: 749b920d0c9d8d29fa1847a70be55ec70ac09ffa57380a6c6acc9df86ea811b838da91d81923ff7ef4d9aca249d08839191691586b796964095c2744cf131f6e
data/.circleci/config.yml CHANGED
@@ -81,7 +81,7 @@ jobs:
81
81
  command: |
82
82
  gem install -N specific_install
83
83
  gem specific_install https://github.com/masutaka/circleci-bundle-update-pr.git
84
- - deploy:
84
+ - run:
85
85
  name: Run circleci-bundle-update-pr
86
86
  command: circleci-bundle-update-pr CircleCI circleci@example.com $CIRCLE_BRANCH -d -l dependencies,ruby
87
87
  - pushover/notify-on-failure
@@ -5,8 +5,8 @@ updates:
5
5
  directory: "/"
6
6
  open-pull-requests-limit: 99
7
7
  schedule:
8
- interval: "monthly"
9
- time: "19:00"
8
+ interval: "cron"
9
+ cronjob: "0 19 1,16 * *"
10
10
  timezone: "Asia/Tokyo"
11
11
  cooldown:
12
12
  default-days: 7
@@ -0,0 +1,49 @@
1
+ # This file is machine-generated by `gh actions-lock`.
2
+ # Do not edit by hand; run `gh actions-lock` to update.
3
+ # Docs: https://gh.io/actions-lockfile
4
+ version: 'v0.0.3'
5
+ workflows:
6
+ '.github/workflows/add_assignee_to_pr.yml': []
7
+ '.github/workflows/ci.yml': []
8
+ '.github/workflows/dependency_review.yml': []
9
+ '.github/workflows/release.yml':
10
+ - 'actions/checkout@v7.0.1'
11
+ - 'actions/create-github-app-token@v3.4.0'
12
+ - 'ruby/setup-ruby@v1.345.0'
13
+ - 'rubygems/release-gem@v1.5.0'
14
+ - 'songmu/tagpr@v1.22.0'
15
+ '.github/workflows/review_deps_pr.yml': []
16
+ '.github/workflows/schedule.yml': []
17
+ dependencies:
18
+ 'actions/checkout@v7.0.1':
19
+ ref: 'v7.0.1'
20
+ commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
21
+ owner_id: 44036562
22
+ repo_id: 197814629
23
+ 'actions/create-github-app-token@v3.4.0':
24
+ ref: 'v3.4.0'
25
+ commit: 'sha1-f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc'
26
+ owner_id: 44036562
27
+ repo_id: 642580244
28
+ 'ruby/setup-ruby@v1.345.0':
29
+ ref: 'v1.345.0'
30
+ commit: 'sha1-145243922b4465b78e04dd66294782c7de45901f'
31
+ owner_id: 210414
32
+ repo_id: 231208785
33
+ 'rubygems/configure-rubygems-credentials@c6ca7f4bac0e29c9bde8eeae0a0a986b27efa05f':
34
+ ref: 'v2.2.0'
35
+ commit: 'sha1-c6ca7f4bac0e29c9bde8eeae0a0a986b27efa05f'
36
+ owner_id: 208761
37
+ repo_id: 631633510
38
+ 'rubygems/release-gem@v1.5.0':
39
+ ref: 'v1.5.0'
40
+ commit: 'sha1-2654a0fe0dc39725c07fe84d7fe863a084f2424e'
41
+ owner_id: 208761
42
+ repo_id: 731435765
43
+ uses:
44
+ - 'rubygems/configure-rubygems-credentials@c6ca7f4bac0e29c9bde8eeae0a0a986b27efa05f'
45
+ 'songmu/tagpr@v1.22.0':
46
+ ref: 'v1.22.0'
47
+ commit: 'sha1-047aec4b6c0ce166f52958b5a97f5a3d927fd65b'
48
+ owner_id: 177122
49
+ repo_id: 524603982
@@ -2,10 +2,9 @@ name: Dependency Review
2
2
 
3
3
  on: [pull_request]
4
4
 
5
- permissions:
6
- contents: read
7
- pull-requests: write
8
-
9
5
  jobs:
10
6
  dependency_review:
11
7
  uses: masutaka/actions/.github/workflows/dependency_review.yml@main
8
+ permissions:
9
+ contents: read
10
+ pull-requests: write
@@ -25,23 +25,23 @@ jobs:
25
25
  permissions:
26
26
  contents: read
27
27
  steps:
28
- - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
28
+ - uses: actions/create-github-app-token@v3.4.0
29
29
  id: app-token
30
30
  with:
31
31
  client-id: ${{ vars.CI_CLIENT_ID }}
32
32
  private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
33
33
  permission-contents: write
34
34
  permission-pull-requests: write
35
- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
35
+ - uses: actions/checkout@v7.0.1
36
36
  with:
37
37
  persist-credentials: false
38
38
  token: ${{ steps.app-token.outputs.token }}
39
39
  # Required to run `bundle lock` via postVersionCommand in .tagpr
40
- - uses: ruby/setup-ruby@762794c140bbeda0f1224786aa33b4b46783a6c1 # v1.326.0
40
+ - uses: ruby/setup-ruby@v1.345.0
41
41
  with:
42
42
  ruby-version: ruby
43
43
  - id: run-tagpr
44
- uses: Songmu/tagpr@2afc990a4a5a9a340665cc1a484c2102f7de332f # v1.21.0
44
+ uses: Songmu/tagpr@v1.22.0
45
45
  env:
46
46
  GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
47
47
  outputs:
@@ -57,11 +57,11 @@ jobs:
57
57
  contents: read # tagpr has already created the tag, so `rake release` does not push it
58
58
  id-token: write # Mandatory for trusted publishing
59
59
  steps:
60
- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
60
+ - uses: actions/checkout@v7.0.1
61
61
  with:
62
62
  persist-credentials: false
63
63
  ref: ${{ needs.tagpr.outputs.tagpr-tag }}
64
- - uses: ruby/setup-ruby@762794c140bbeda0f1224786aa33b4b46783a6c1 # v1.326.0
64
+ - uses: ruby/setup-ruby@v1.345.0
65
65
  with:
66
66
  ruby-version: ruby
67
67
  # `status` is not a trusted trigger, so this run only gets a read-only cache
@@ -70,7 +70,7 @@ jobs:
70
70
  # https://github.blog/changelog/2026-06-26-read-only-actions-cache-for-untrusted-triggers/
71
71
  - run: bundle install --jobs 4
72
72
  # Runs `bundle exec rake release` internally
73
- - uses: rubygems/release-gem@7f9650160c1a4e7989fdc9855807bdbd421d8b6b # v1.4.1
73
+ - uses: rubygems/release-gem@v1.5.0
74
74
 
75
75
  pushover:
76
76
  name: pushover if failure
@@ -0,0 +1,25 @@
1
+ name: Review deps PR
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened]
6
+ workflow_dispatch:
7
+ inputs:
8
+ pr-number:
9
+ description: Number of the Dependabot PR to review
10
+ required: true
11
+ type: number
12
+
13
+ jobs:
14
+ review_deps_pr:
15
+ if: github.event_name == 'workflow_dispatch' || github.event.pull_request.user.login == 'dependabot[bot]'
16
+ uses: masutaka/actions/.github/workflows/review_deps_pr.yml@main
17
+ permissions:
18
+ contents: read
19
+ id-token: write
20
+ pull-requests: write
21
+ with:
22
+ pr-number: ${{ inputs.pr-number || github.event.pull_request.number }}
23
+ language: en
24
+ secrets:
25
+ REVIEW_DEPS_PR_APP_PRIVATE_KEY: ${{ secrets.REVIEW_DEPS_PR_APP_PRIVATE_KEY }}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [v5.2.10](https://github.com/masutaka/circleci-bundle-update-pr/compare/v5.2.9...v5.2.10) - 2026-12-04
4
+
5
+ ### Maintenance :technologist:
6
+ - bundle update at 2026-11-01 19:11:30 JST by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/292
7
+ - chore: Introduce actions.lock to pin transitive dependencies to commits by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/294
8
+ - chore: Run dependency updates on the 1st and 16th to avoid piling up monthly updates by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/295
9
+ - chore(deps): Bump Songmu/tagpr from 1.21.4 to 1.22.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/296
10
+ - chore(deps): Bump ruby/setup-ruby from 1.335.0 to 1.336.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/297
11
+ - chore(deps): Bump ruby/setup-ruby from 1.336.0 to 1.338.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/298
12
+ - chore(deps): Bump actions/create-github-app-token from 3.3.0 to 3.4.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/300
13
+ - chore(deps): Bump addressable from 2.9.2 to 2.10.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/303
14
+ - chore(deps): Bump rubygems/release-gem from 1.4.1 to 1.5.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/301
15
+ - chore(deps): Bump ruby/setup-ruby from 1.338.0 to 1.345.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/302
16
+
17
+ ## [v5.2.9](https://github.com/masutaka/circleci-bundle-update-pr/compare/v5.2.8...v5.2.9) - 2026-11-03
18
+
19
+ ### Maintenance :technologist:
20
+ - bundle update at 2026-10-01 19:11:28 JST by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/279
21
+ - chore: Remove ghalint and zizmor configs now provided by masutaka/actions by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/283
22
+ - docs: Switch to fine-grained PAT, refresh examples, and add Japanese README by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/284
23
+ - chore: Grant permissions on the job so that later jobs do not inherit pull-requests: write by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/286
24
+ - feat: Review dependency update PRs automatically with Claude to make them easier to check by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/285
25
+ - refactor: Follow the secret rename in the reusable workflow by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/287
26
+ - feat: Write the dependency update PR review in English by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/288
27
+ - chore(deps): Bump ruby/setup-ruby from 1.326.0 to 1.335.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/289
28
+ - chore(deps): Bump actions/create-github-app-token from 3.2.0 to 3.3.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/291
29
+ - chore(deps): Bump Songmu/tagpr from 1.21.0 to 1.21.4 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/290
30
+
3
31
  ## [v5.2.8](https://github.com/masutaka/circleci-bundle-update-pr/compare/v5.2.7...v5.2.8) - 2026-10-03
4
32
 
5
33
  ### Maintenance :technologist:
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- circleci-bundle-update-pr (5.2.8)
4
+ circleci-bundle-update-pr (5.2.10)
5
5
  compare_linker (>= 1.4.10)
6
6
  octokit
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.9.0)
11
+ addressable (2.10.0)
12
12
  public_suffix (>= 2.0.2, < 8.0)
13
13
  ast (2.4.3)
14
14
  base64 (0.3.0)
@@ -18,35 +18,38 @@ GEM
18
18
  octokit
19
19
  ostruct
20
20
  diff-lcs (1.6.2)
21
- faraday (2.14.3)
22
- faraday-net_http (>= 2.0, < 3.5)
21
+ faraday (2.15.1)
22
+ faraday-net_http (>= 2.0, < 3.6)
23
23
  json
24
24
  logger
25
- faraday-net_http (3.4.4)
25
+ faraday-net_http (3.5.0)
26
26
  net-http (~> 0.5)
27
- httpclient (2.9.0)
27
+ httpclient (2.10.0)
28
28
  mutex_m
29
- json (2.21.2)
29
+ json (3.1.0)
30
30
  language_server-protocol (3.17.0.6)
31
31
  lint_roller (1.1.0)
32
32
  logger (1.7.0)
33
33
  mutex_m (0.3.0)
34
- net-http (0.9.1)
34
+ net-http (0.10.0)
35
+ net-protocol (>= 0.3.0)
35
36
  uri (>= 0.11.1)
37
+ net-protocol (0.4.0)
38
+ timeout
36
39
  octokit (10.0.0)
37
40
  faraday (>= 1, < 3)
38
41
  sawyer (~> 0.9)
39
42
  ostruct (0.6.3)
40
- parallel (2.1.0)
41
- parser (3.3.12.0)
43
+ parallel (2.3.0)
44
+ parser (3.3.13.0)
42
45
  ast (~> 2.4.1)
43
46
  racc
44
47
  prism (1.9.0)
45
- public_suffix (7.0.5)
48
+ public_suffix (6.0.2)
46
49
  racc (1.8.1)
47
50
  rainbow (3.1.1)
48
51
  rake (13.4.2)
49
- regexp_parser (2.12.0)
52
+ regexp_parser (2.13.1)
50
53
  rspec (3.13.2)
51
54
  rspec-core (~> 3.13.0)
52
55
  rspec-expectations (~> 3.13.0)
@@ -60,14 +63,14 @@ GEM
60
63
  diff-lcs (>= 1.2.0, < 2.0)
61
64
  rspec-support (~> 3.13.0)
62
65
  rspec-support (3.13.7)
63
- rubocop (1.90.0)
66
+ rubocop (1.92.2)
64
67
  json (>= 2.3)
65
68
  language_server-protocol (~> 3.17.0.2)
66
69
  lint_roller (~> 1.1.0)
67
70
  parallel (>= 1.10)
68
71
  parser (>= 3.3.0.2)
69
72
  rainbow (>= 2.2.2, < 4.0)
70
- regexp_parser (>= 2.9.3, < 3.0)
73
+ regexp_parser (>= 2.11.3, < 3.0)
71
74
  rubocop-ast (>= 1.49.0, < 2.0)
72
75
  ruby-progressbar (~> 1.7)
73
76
  unicode-display_width (>= 2.4.0, < 4.0)
@@ -85,10 +88,11 @@ GEM
85
88
  sawyer (0.9.3)
86
89
  addressable (>= 2.3.5)
87
90
  faraday (>= 0.17.3, < 3)
88
- unicode-display_width (3.2.0)
89
- unicode-emoji (~> 4.1)
90
- unicode-emoji (4.2.0)
91
- uri (1.1.1)
91
+ timeout (0.6.1)
92
+ unicode-display_width (3.3.0)
93
+ unicode-emoji (~> 4.3)
94
+ unicode-emoji (4.3.0)
95
+ uri (1.1.2)
92
96
 
93
97
  PLATFORMS
94
98
  ruby
@@ -108,4 +112,4 @@ DEPENDENCIES
108
112
  rubocop-rspec
109
113
 
110
114
  BUNDLED WITH
111
- 4.0.16
115
+ 4.0.23
data/README.md CHANGED
@@ -12,6 +12,11 @@
12
12
  [gem]: https://rubygems.org/gems/circleci-bundle-update-pr
13
13
  [deepwiki]: https://deepwiki.com/masutaka/circleci-bundle-update-pr
14
14
 
15
+ <p>
16
+ <a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
17
+ <a href="./README_ja.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
18
+ </p>
19
+
15
20
  `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).
16
21
 
17
22
  By 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.
@@ -28,15 +33,19 @@ The application on which you want to run continuous bundle update must be config
28
33
 
29
34
  ## Usage
30
35
 
31
- ### Setting GitHub personal access token to CircleCI
36
+ ### Setting GitHub fine-grained personal access token to CircleCI
32
37
 
33
- GitHub personal access token is required for sending pull requests to your repository.
38
+ GitHub fine-grained personal access token is required for sending pull requests to your repository.
34
39
 
35
- 1. Go to [your account's settings page](https://github.com/settings/tokens) and generate a personal access token with "repo" scope
40
+ 1. Go to [your account's settings page](https://github.com/settings/personal-access-tokens/new) and generate a fine-grained personal access token
41
+ * Repository access: Select your repository
42
+ * Repository permissions:
43
+ * Contents: Read and write
44
+ * Pull requests: Read and write
36
45
  2. On CircleCI dashboard, go to your application's "Project Settings" -> "Environment Variables"
37
- 3. Add an environment variable `GITHUB_ACCESS_TOKEN` with your GitHub personal access token
46
+ 3. Add an environment variable `GITHUB_ACCESS_TOKEN` with your GitHub fine-grained personal access token
38
47
  * If use GitHub Enterprise
39
- * `ENTERPRISE_OCTOKIT_ACCESS_TOKEN` with your GitHub Enterprise personal access token
48
+ * `ENTERPRISE_OCTOKIT_ACCESS_TOKEN` with your GitHub Enterprise fine-grained personal access token
40
49
  * `ENTERPRISE_OCTOKIT_API_ENDPOINT` with your GitHub Enterprise api endpoint (e.g. https://www.example.com/api/v3)
41
50
 
42
51
  ### Configure circle.yml
@@ -50,19 +59,12 @@ jobs:
50
59
  # snip
51
60
  continuous_bundle_update:
52
61
  docker:
53
- - image: ruby:3.0.1-alpine
54
- working_directory: /work
62
+ - image: cimg/ruby:4.0
63
+ working_directory: ~/repo
55
64
  steps:
56
- - run:
57
- name: Install System Dependencies
58
- command: |
59
- # See also https://circleci.com/docs/2.0/custom-images/#required-tools-for-primary-containers
60
- apk add --update --no-cache git openssh-client tar gzip ca-certificates \
61
- tzdata
62
- gem install -N bundler
63
65
  - run:
64
66
  name: Set timezone to Asia/Tokyo
65
- command: cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
67
+ command: sudo cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
66
68
  - checkout
67
69
  - restore_cache:
68
70
  name: Restore bundler cache
@@ -72,7 +74,7 @@ jobs:
72
74
  - run:
73
75
  name: Setup requirements for continuous bundle update
74
76
  command: gem install -N circleci-bundle-update-pr
75
- - deploy:
77
+ - run:
76
78
  name: Continuous bundle update
77
79
  command: circleci-bundle-update-pr <username> <email>
78
80
 
@@ -175,13 +177,17 @@ jobs:
175
177
  build:
176
178
  runs-on: ubuntu-latest
177
179
 
180
+ permissions:
181
+ contents: write
182
+ pull-requests: write
183
+
178
184
  steps:
179
- - uses: actions/checkout@v5
185
+ - uses: actions/checkout@v7
180
186
 
181
187
  - name: Set up Ruby
182
188
  uses: ruby/setup-ruby@v1
183
189
  with:
184
- ruby-version: '3.4'
190
+ ruby-version: '4.0'
185
191
 
186
192
  - name: Install dependencies
187
193
  run: |
data/README_ja.md ADDED
@@ -0,0 +1,233 @@
1
+ # Circleci::Bundle::Update::Pr
2
+
3
+ [![CircleCI Status](https://img.shields.io/circleci/build/github/masutaka/circleci-bundle-update-pr/main?style=flat-square&logo=circieci&label=CircleCI)][circleci]
4
+ [![CI](https://github.com/masutaka/circleci-bundle-update-pr/actions/workflows/ci.yml/badge.svg?branch=main)][ci]
5
+ [![Schedule](https://github.com/masutaka/circleci-bundle-update-pr/actions/workflows/schedule.yml/badge.svg?branch=main)][schedule]
6
+ [![Gem Version](https://img.shields.io/gem/v/circleci-bundle-update-pr?style=flat-square&logo=rubygems&label=Gem)][gem]
7
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)][deepwiki]
8
+
9
+ [circleci]: https://app.circleci.com/pipelines/github/masutaka/circleci-bundle-update-pr?branch=main
10
+ [ci]: https://github.com/masutaka/circleci-bundle-update-pr/actions/workflows/ci.yml?query=branch%3Amain
11
+ [schedule]: https://github.com/masutaka/circleci-bundle-update-pr/actions/workflows/schedule.yml?query=branch%3Amain
12
+ [gem]: https://rubygems.org/gems/circleci-bundle-update-pr
13
+ [deepwiki]: https://deepwiki.com/masutaka/circleci-bundle-update-pr
14
+
15
+ <p>
16
+ <a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
17
+ <a href="./README_ja.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
18
+ </p>
19
+
20
+ `circleci-bundle-update-pr` は、[CircleCI のスケジュール実行](https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow)を使って bundle update を定期的に行い、Pull Request を作成するスクリプトです。
21
+
22
+ `circle.yml` または `.circleci/config.yml` に設定しておくと、CircleCI の定期ビルドで bundle update が実行されます。変更があればコミットし、GitHub のリポジトリに Pull Request を送ります。
23
+
24
+ ## インストール
25
+
26
+ ```
27
+ $ gem install circleci-bundle-update-pr
28
+ ```
29
+
30
+ ## 前提条件
31
+
32
+ bundle update を定期実行したいアプリケーションが、CircleCI でビルドできるようになっている必要があります。
33
+
34
+ ## 使い方
35
+
36
+ ### GitHub の fine-grained personal access token を CircleCI に設定する
37
+
38
+ リポジトリに Pull Request を送るには、GitHub の fine-grained personal access token が必要です。
39
+
40
+ 1. [アカウントの設定ページ](https://github.com/settings/personal-access-tokens/new)で fine-grained personal access token を作成する
41
+ * Repository access: 対象のリポジトリを選択
42
+ * Repository permissions:
43
+ * Contents: Read and write
44
+ * Pull requests: Read and write
45
+ 2. CircleCI のダッシュボードで、アプリケーションの "Project Settings" -> "Environment Variables" を開く
46
+ 3. 環境変数 `GITHUB_ACCESS_TOKEN` に、作成した fine-grained personal access token を設定する
47
+ * GitHub Enterprise を使う場合
48
+ * `ENTERPRISE_OCTOKIT_ACCESS_TOKEN` に GitHub Enterprise の fine-grained personal access token を設定する
49
+ * `ENTERPRISE_OCTOKIT_API_ENDPOINT` に GitHub Enterprise の API エンドポイントを設定する(例: https://www.example.com/api/v3)
50
+
51
+ ### circle.yml を設定する
52
+
53
+ `circle.yml` または `.circleci/config.yml` に、`circleci-bundle-update-pr` を実行する設定を追加します。例:
54
+
55
+ ```yaml
56
+ version: 2
57
+ jobs:
58
+ build:
59
+ # snip
60
+ continuous_bundle_update:
61
+ docker:
62
+ - image: cimg/ruby:4.0
63
+ working_directory: ~/repo
64
+ steps:
65
+ - run:
66
+ name: Set timezone to Asia/Tokyo
67
+ command: sudo cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
68
+ - checkout
69
+ - restore_cache:
70
+ name: Restore bundler cache
71
+ keys:
72
+ - gems-{{ .Environment.COMMON_CACHE_KEY }}-{{ checksum "Gemfile.lock" }}
73
+ - gems-{{ .Environment.COMMON_CACHE_KEY }}-
74
+ - run:
75
+ name: Setup requirements for continuous bundle update
76
+ command: gem install -N circleci-bundle-update-pr
77
+ - run:
78
+ name: Continuous bundle update
79
+ command: circleci-bundle-update-pr <username> <email>
80
+
81
+ workflows:
82
+ version: 2
83
+ build:
84
+ jobs:
85
+ - build:
86
+ # snip
87
+ nightly:
88
+ triggers:
89
+ - schedule:
90
+ cron: "00 10 * * 5"
91
+ filters:
92
+ branches:
93
+ only: main
94
+ jobs:
95
+ - continuous_bundle_update
96
+ ```
97
+
98
+ NOTE: `<username>` と `<email>` は自分のものに置き換えてください。
99
+
100
+ `circleci-bundle-update-pr` 自身も、このスクリプトで定期的に更新しています。[.circleci/config.yml](.circleci/config.yml) も参考にしてください。
101
+
102
+ ## CLI コマンドリファレンス
103
+
104
+ 基本的な使い方:
105
+
106
+ ```
107
+ $ circleci-bundle-update-pr <git username> <git email address>
108
+ ```
109
+
110
+ デフォルトでは master と main ブランチでのみ動作します。引数にブランチを追加すると、それ以外のブランチでも動作します。
111
+
112
+ ```
113
+ $ circleci-bundle-update-pr <git username> <git email address> main develop topic
114
+ ```
115
+
116
+ 次のオプションも使えます。
117
+
118
+ ```
119
+ $ circleci-bundle-update-pr -h
120
+ Usage: circleci-bundle-update-pr [options]
121
+ -a, --assignees alice,bob,carol Assign the PR to them
122
+ -r, --reviewers alice,bob,carol Request PR review to them
123
+ -l, --labels "In Review, Update" Add labels to the PR
124
+ -d, --duplicate Make PR even if it has already existed
125
+ ```
126
+
127
+ ## Tips
128
+
129
+ ### PR の説明文をカスタマイズする
130
+
131
+ `.circleci/BUNDLE_UPDATE_NOTE.md` があると、その内容が PR の説明文の末尾に追加されます。
132
+
133
+ たとえば `.circleci/BUNDLE_UPDATE_NOTE.md` が次の内容だとします。
134
+
135
+ ```
136
+ ## Notice
137
+
138
+ * example1
139
+ * example2
140
+ ```
141
+
142
+ PR の説明文は次のようになります。
143
+
144
+ ```
145
+ **Updated RubyGems:**
146
+
147
+ * [ ] [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)
148
+ * [ ] [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)
149
+
150
+ Powered by [circleci-bundle-update-pr](https://rubygems.org/gems/circleci-bundle-update-pr)
151
+
152
+ ---
153
+
154
+ ## Notice
155
+
156
+ * example1
157
+ * example2
158
+ ```
159
+
160
+ ファイル名は `.circleci/BUNDLE_UPDATE_NOTE.md` と `CIRCLECI_BUNDLE_UPDATE_NOTE.md` のどちらでも構いません。両方ある場合は `.circleci/BUNDLE_UPDATE_NOTE.md` が優先されます。
161
+
162
+ ### GitHub Actions で実行する
163
+
164
+ > [!WARNING]
165
+ > GitHub Actions は公式にはサポートしていません。あくまで Tips です。
166
+
167
+ `.github/workflows/bundle-update-pr.yml` に、circleci-bundle-update-pr を実行する設定を追加します。例:
168
+
169
+ ```yaml
170
+ name: bundle-update-pr
171
+
172
+ on:
173
+ schedule:
174
+ - cron: "00 10 * * 5" # JST 19:00 (Fri)
175
+
176
+ jobs:
177
+ build:
178
+ runs-on: ubuntu-latest
179
+
180
+ permissions:
181
+ contents: write
182
+ pull-requests: write
183
+
184
+ steps:
185
+ - uses: actions/checkout@v7
186
+
187
+ - name: Set up Ruby
188
+ uses: ruby/setup-ruby@v1
189
+ with:
190
+ ruby-version: '4.0'
191
+
192
+ - name: Install dependencies
193
+ run: |
194
+ set -x
195
+ gem install -N bundler circleci-bundle-update-pr
196
+
197
+ - name: Set timezone to Asia/Tokyo
198
+ run: |
199
+ set -x
200
+ cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
201
+
202
+ - name: run circleci-bundle-update-pr
203
+ run: |
204
+ set -x
205
+
206
+ export CIRCLE_BRANCH=$(echo $GITHUB_REF | sed -e 's!refs/heads/!!g')
207
+ export CIRCLE_PROJECT_USERNAME=$(echo $GITHUB_REPOSITORY | cut -d "/" -f 1)
208
+ export CIRCLE_PROJECT_REPONAME=$(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)
209
+
210
+ git checkout -b $CIRCLE_BRANCH
211
+
212
+ circleci-bundle-update-pr "${GIT_USER_NAME}" "${GIT_USER_EMAIL}"
213
+ env:
214
+ GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
215
+ GIT_USER_NAME: "your name"
216
+ GIT_USER_EMAIL: "ci@example.com"
217
+ ```
218
+
219
+ ## コントリビューション
220
+
221
+ 1. フォークする ( https://github.com/masutaka/circleci-bundle-update-pr/fork )
222
+ 2. フィーチャーブランチを作成する (`git checkout -b my-new-feature`)
223
+ 3. 変更をコミットする (`git commit -am 'Add some feature'`)
224
+ 4. ブランチにプッシュする (`git push origin my-new-feature`)
225
+ 5. Pull Request を作成する
226
+
227
+ ## コントリビューターの皆さん
228
+
229
+ <a href="https://github.com/masutaka/circleci-bundle-update-pr/graphs/contributors">
230
+ <img src="https://contrib.rocks/image?repo=masutaka/circleci-bundle-update-pr" />
231
+ </a>
232
+
233
+ *[contrib.rocks](https://contrib.rocks) で作成。*
@@ -4,7 +4,7 @@ module Circleci
4
4
  module Bundle
5
5
  module Update
6
6
  module Pr
7
- VERSION = '5.2.8'
7
+ VERSION = '5.2.10'
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: circleci-bundle-update-pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.8
4
+ version: 5.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Masuda
@@ -132,14 +132,14 @@ files:
132
132
  - ".circleci/config.yml"
133
133
  - ".github/CODEOWNERS"
134
134
  - ".github/dependabot.yml"
135
- - ".github/ghalint.yml"
136
135
  - ".github/release.yml"
136
+ - ".github/workflows/actions.lock"
137
137
  - ".github/workflows/add_assignee_to_pr.yml"
138
138
  - ".github/workflows/ci.yml"
139
139
  - ".github/workflows/dependency_review.yml"
140
140
  - ".github/workflows/release.yml"
141
+ - ".github/workflows/review_deps_pr.yml"
141
142
  - ".github/workflows/schedule.yml"
142
- - ".github/zizmor.yml"
143
143
  - ".gitignore"
144
144
  - ".rspec"
145
145
  - ".rubocop.yml"
@@ -150,6 +150,7 @@ files:
150
150
  - Gemfile.lock
151
151
  - LICENSE.txt
152
152
  - README.md
153
+ - README_ja.md
153
154
  - Rakefile
154
155
  - bin/circleci-bundle-update-pr
155
156
  - circleci-bundle-update-pr.gemspec
data/.github/ghalint.yml DELETED
@@ -1,6 +0,0 @@
1
- # yaml-language-server: $schema=https://raw.githubusercontent.com/suzuki-shunsuke/ghalint/refs/heads/main/json-schema/ghalint.json
2
- # ghalint - https://github.com/suzuki-shunsuke/ghalint
3
-
4
- excludes:
5
- - policy_name: action_ref_should_be_full_length_commit_sha
6
- action_name: masutaka/actions/.github/workflows/*.yml
data/.github/zizmor.yml DELETED
@@ -1,7 +0,0 @@
1
- # zizmor - https://github.com/zizmorcore/zizmor
2
-
3
- rules:
4
- unpinned-uses:
5
- config:
6
- policies:
7
- masutaka/actions/*: ref-pin