circleci-bundle-update-pr 5.2.7 → 5.2.9
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 +4 -4
- data/.circleci/config.yml +1 -1
- data/.github/workflows/dependency_review.yml +3 -4
- data/.github/workflows/release.yml +10 -9
- data/.github/workflows/review_deps_pr.yml +25 -0
- data/.tagpr +1 -1
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +11 -11
- data/README.md +24 -18
- data/README_ja.md +233 -0
- data/lib/circleci/bundle/update/pr/version.rb +1 -1
- metadata +4 -5
- data/.github/actionlint.yaml +0 -8
- data/.github/ghalint.yml +0 -6
- data/.github/zizmor.yml +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b4121dcaa0ca2106c62784956e72555a3ff502e005156704eccabae83ef500f
|
|
4
|
+
data.tar.gz: 4f59888637d2e263420fea78b1d5168e7897dff264a23834dea1c791e00fb729
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6caeb9519b2e6959aa7cf57d7c9a3524df22b85d8af9a6d018cacebc371da74aed305b5ffd62579407d359d8781f2e7b81f81ad74514bf6474174340de385a04
|
|
7
|
+
data.tar.gz: ce2d80c2334407c15f8a33c5aebbefb1b0f0a1ed1e696b867ce2d90e462fb09bfd2fc4665daaa67a56cd2eb1e4d8797139ee2091a599656f806c2e05f9bb0e6b
|
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
|
-
-
|
|
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
|
|
@@ -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,10 +25,10 @@ jobs:
|
|
|
25
25
|
permissions:
|
|
26
26
|
contents: read
|
|
27
27
|
steps:
|
|
28
|
-
- uses: actions/create-github-app-token@
|
|
28
|
+
- uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.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
|
|
@@ -37,11 +37,11 @@ jobs:
|
|
|
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@
|
|
40
|
+
- uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
|
|
41
41
|
with:
|
|
42
42
|
ruby-version: ruby
|
|
43
43
|
- id: run-tagpr
|
|
44
|
-
uses: Songmu/tagpr@
|
|
44
|
+
uses: Songmu/tagpr@e1250d6c84e4425db82b5e90549d62dfe23e9ebe # v1.21.4
|
|
45
45
|
env:
|
|
46
46
|
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
47
47
|
outputs:
|
|
@@ -61,13 +61,14 @@ jobs:
|
|
|
61
61
|
with:
|
|
62
62
|
persist-credentials: false
|
|
63
63
|
ref: ${{ needs.tagpr.outputs.tagpr-tag }}
|
|
64
|
-
- uses: ruby/setup-ruby@
|
|
64
|
+
- uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
|
|
65
65
|
with:
|
|
66
66
|
ruby-version: ruby
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
# `status` is not a trusted trigger, so this run only gets a read-only cache
|
|
68
|
+
# token and `bundler-cache: true` fails to save. Nothing writes a bundler
|
|
69
|
+
# cache here anyway -- the test matrix lives on CircleCI -- so just install.
|
|
70
|
+
# https://github.blog/changelog/2026-06-26-read-only-actions-cache-for-untrusted-triggers/
|
|
71
|
+
- run: bundle install --jobs 4
|
|
71
72
|
# Runs `bundle exec rake release` internally
|
|
72
73
|
- uses: rubygems/release-gem@7f9650160c1a4e7989fdc9855807bdbd421d8b6b # v1.4.1
|
|
73
74
|
|
|
@@ -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/.tagpr
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
vPrefix = true
|
|
5
5
|
releaseBranch = main
|
|
6
6
|
versionFile = lib/circleci/bundle/update/pr/version.rb
|
|
7
|
-
release =
|
|
7
|
+
release = true
|
|
8
8
|
# Rewriting versionFile alone leaves the PATH section of Gemfile.lock stale,
|
|
9
9
|
# which makes `rake release` in the release job fail at release:guard_clean.
|
|
10
10
|
postVersionCommand = bundle lock
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v5.2.9](https://github.com/masutaka/circleci-bundle-update-pr/compare/v5.2.8...v5.2.9) - 2026-11-03
|
|
4
|
+
|
|
5
|
+
### Maintenance :technologist:
|
|
6
|
+
- bundle update at 2026-10-01 19:11:28 JST by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/279
|
|
7
|
+
- chore: Remove ghalint and zizmor configs now provided by masutaka/actions by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/283
|
|
8
|
+
- 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
|
|
9
|
+
- 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
|
|
10
|
+
- 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
|
|
11
|
+
- refactor: Follow the secret rename in the reusable workflow by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/287
|
|
12
|
+
- feat: Write the dependency update PR review in English by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/288
|
|
13
|
+
- 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
|
|
14
|
+
- 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
|
|
15
|
+
- 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
|
|
16
|
+
|
|
17
|
+
## [v5.2.8](https://github.com/masutaka/circleci-bundle-update-pr/compare/v5.2.7...v5.2.8) - 2026-10-03
|
|
18
|
+
|
|
19
|
+
### Maintenance :technologist:
|
|
20
|
+
- Fix two rough edges in the tagpr release flow by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/275
|
|
21
|
+
- bundle update at 2026-09-01 19:11:22 JST by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/272
|
|
22
|
+
- chore: Remove actionlint config superseded by masutaka/actions by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/277
|
|
23
|
+
- chore: Replace deprecated app-id input of create-github-app-token with client-id by @masutaka in https://github.com/masutaka/circleci-bundle-update-pr/pull/278
|
|
24
|
+
- chore(deps): Bump ruby/setup-ruby from 1.321.0 to 1.326.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/281
|
|
25
|
+
- chore(deps): Bump Songmu/tagpr from 1.20.2 to 1.21.0 by @dependabot[bot] in https://github.com/masutaka/circleci-bundle-update-pr/pull/280
|
|
26
|
+
|
|
3
27
|
## [v5.2.7](https://github.com/masutaka/circleci-bundle-update-pr/compare/v5.2.6...v5.2.7) - 2026-09-01
|
|
4
28
|
|
|
5
29
|
### Maintenance :technologist:
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
circleci-bundle-update-pr (5.2.
|
|
4
|
+
circleci-bundle-update-pr (5.2.9)
|
|
5
5
|
compare_linker (>= 1.4.10)
|
|
6
6
|
octokit
|
|
7
7
|
|
|
@@ -18,7 +18,7 @@ GEM
|
|
|
18
18
|
octokit
|
|
19
19
|
ostruct
|
|
20
20
|
diff-lcs (1.6.2)
|
|
21
|
-
faraday (2.14.
|
|
21
|
+
faraday (2.14.4)
|
|
22
22
|
faraday-net_http (>= 2.0, < 3.5)
|
|
23
23
|
json
|
|
24
24
|
logger
|
|
@@ -26,7 +26,7 @@ GEM
|
|
|
26
26
|
net-http (~> 0.5)
|
|
27
27
|
httpclient (2.9.0)
|
|
28
28
|
mutex_m
|
|
29
|
-
json (
|
|
29
|
+
json (3.0.2)
|
|
30
30
|
language_server-protocol (3.17.0.6)
|
|
31
31
|
lint_roller (1.1.0)
|
|
32
32
|
logger (1.7.0)
|
|
@@ -37,7 +37,7 @@ GEM
|
|
|
37
37
|
faraday (>= 1, < 3)
|
|
38
38
|
sawyer (~> 0.9)
|
|
39
39
|
ostruct (0.6.3)
|
|
40
|
-
parallel (2.
|
|
40
|
+
parallel (2.2.0)
|
|
41
41
|
parser (3.3.12.0)
|
|
42
42
|
ast (~> 2.4.1)
|
|
43
43
|
racc
|
|
@@ -46,7 +46,7 @@ GEM
|
|
|
46
46
|
racc (1.8.1)
|
|
47
47
|
rainbow (3.1.1)
|
|
48
48
|
rake (13.4.2)
|
|
49
|
-
regexp_parser (2.
|
|
49
|
+
regexp_parser (2.13.1)
|
|
50
50
|
rspec (3.13.2)
|
|
51
51
|
rspec-core (~> 3.13.0)
|
|
52
52
|
rspec-expectations (~> 3.13.0)
|
|
@@ -60,8 +60,8 @@ GEM
|
|
|
60
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
61
61
|
rspec-support (~> 3.13.0)
|
|
62
62
|
rspec-support (3.13.7)
|
|
63
|
-
rubocop (1.
|
|
64
|
-
json (
|
|
63
|
+
rubocop (1.91.0)
|
|
64
|
+
json (>= 2.3)
|
|
65
65
|
language_server-protocol (~> 3.17.0.2)
|
|
66
66
|
lint_roller (~> 1.1.0)
|
|
67
67
|
parallel (>= 1.10)
|
|
@@ -85,9 +85,9 @@ GEM
|
|
|
85
85
|
sawyer (0.9.3)
|
|
86
86
|
addressable (>= 2.3.5)
|
|
87
87
|
faraday (>= 0.17.3, < 3)
|
|
88
|
-
unicode-display_width (3.
|
|
89
|
-
unicode-emoji (~> 4.
|
|
90
|
-
unicode-emoji (4.
|
|
88
|
+
unicode-display_width (3.3.0)
|
|
89
|
+
unicode-emoji (~> 4.3)
|
|
90
|
+
unicode-emoji (4.3.0)
|
|
91
91
|
uri (1.1.1)
|
|
92
92
|
|
|
93
93
|
PLATFORMS
|
|
@@ -108,4 +108,4 @@ DEPENDENCIES
|
|
|
108
108
|
rubocop-rspec
|
|
109
109
|
|
|
110
110
|
BUNDLED WITH
|
|
111
|
-
4.0.
|
|
111
|
+
4.0.20
|
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
|
|
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:
|
|
54
|
-
working_directory:
|
|
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
|
-
-
|
|
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@
|
|
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: '
|
|
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]
|
|
4
|
+
[][ci]
|
|
5
|
+
[][schedule]
|
|
6
|
+
[][gem]
|
|
7
|
+
[][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) で作成。*
|
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.
|
|
4
|
+
version: 5.2.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takashi Masuda
|
|
@@ -131,16 +131,14 @@ extra_rdoc_files: []
|
|
|
131
131
|
files:
|
|
132
132
|
- ".circleci/config.yml"
|
|
133
133
|
- ".github/CODEOWNERS"
|
|
134
|
-
- ".github/actionlint.yaml"
|
|
135
134
|
- ".github/dependabot.yml"
|
|
136
|
-
- ".github/ghalint.yml"
|
|
137
135
|
- ".github/release.yml"
|
|
138
136
|
- ".github/workflows/add_assignee_to_pr.yml"
|
|
139
137
|
- ".github/workflows/ci.yml"
|
|
140
138
|
- ".github/workflows/dependency_review.yml"
|
|
141
139
|
- ".github/workflows/release.yml"
|
|
140
|
+
- ".github/workflows/review_deps_pr.yml"
|
|
142
141
|
- ".github/workflows/schedule.yml"
|
|
143
|
-
- ".github/zizmor.yml"
|
|
144
142
|
- ".gitignore"
|
|
145
143
|
- ".rspec"
|
|
146
144
|
- ".rubocop.yml"
|
|
@@ -151,6 +149,7 @@ files:
|
|
|
151
149
|
- Gemfile.lock
|
|
152
150
|
- LICENSE.txt
|
|
153
151
|
- README.md
|
|
152
|
+
- README_ja.md
|
|
154
153
|
- Rakefile
|
|
155
154
|
- bin/circleci-bundle-update-pr
|
|
156
155
|
- circleci-bundle-update-pr.gemspec
|
|
@@ -179,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
179
178
|
- !ruby/object:Gem::Version
|
|
180
179
|
version: '0'
|
|
181
180
|
requirements: []
|
|
182
|
-
rubygems_version: 4.0.
|
|
181
|
+
rubygems_version: 4.0.20
|
|
183
182
|
specification_version: 4
|
|
184
183
|
summary: Provide continues bundle update using CircleCI
|
|
185
184
|
test_files: []
|
data/.github/actionlint.yaml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# actionlint - https://github.com/rhysd/actionlint/blob/main/docs/config.md
|
|
2
|
-
|
|
3
|
-
paths:
|
|
4
|
-
.github/workflows/release.yml:
|
|
5
|
-
ignore:
|
|
6
|
-
# concurrency.queue is a valid key added in 2026-05, but actionlint 1.7.12 does not know it yet.
|
|
7
|
-
# https://github.blog/changelog/2026-05-07-github-actions-concurrency-groups-now-allow-larger-queues/
|
|
8
|
-
- 'unexpected key "queue" for "concurrency" section'
|
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
|