Skip to content

Commit 8105143

Browse files
authored
Merge branch 'github:main' into main
2 parents f9be53a + ed893f5 commit 8105143

208 files changed

Lines changed: 1257 additions & 195 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/collections-renames.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
if: github.repository_owner == 'github'
1818
steps:
19-
- uses: actions/checkout@v4.2.2
19+
- uses: actions/checkout@v6.0.2
2020

2121
- name: Setup Ruby
22-
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
22+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
2323
with:
2424
bundler-cache: true
2525

@@ -30,7 +30,8 @@ jobs:
3030
run: bundle exec rake collections
3131

3232
- name: Commit changes and open PR
33-
uses: peter-evans/create-pull-request@v7
33+
id: cpr
34+
uses: peter-evans/create-pull-request@v8
3435
with:
3536
commit-message: "✨ Autofixing renamed/removed collection items ✨"
3637
committer: "github-actions[bot] <actions@github.com>"

.github/workflows/conflict.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- run: |
1515
echo "In order to review this pull request for acceptance, we need to make sure that all of the prerequisites are satisfied."
1616
echo "This was not checked:"
17-
echo "> This change is not self-promotion.
17+
echo "> This change is not self-promotion."
1818
echo "This is a requirement to maintain a high level of independence in this project. Please update to confirm there is no conflict of interest."
1919
echo "Thank you!"
2020
exit 1

.github/workflows/jekyll_build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: 📂 checkout
24-
uses: actions/checkout@v4.2.2
24+
uses: actions/checkout@v6.0.2
2525

2626
- name: 💎 setup ruby
27-
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
27+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
2828
with:
2929
bundler-cache: true
3030
cache-version: 0
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697 # v1.0.13
3838

3939
- name: ⚡️ upload artifact
40-
uses: actions/upload-pages-artifact@v3.0.1
40+
uses: actions/upload-pages-artifact@v4.0.0
4141

4242
deploy:
4343
needs: build

.github/workflows/lint.yml

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,65 @@
11
name: Lint
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
workflow_dispatch:
66
merge_group:
77

8-
permissions:
9-
contents: write
10-
118
jobs:
129
lint:
1310
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
1413
steps:
15-
- uses: actions/checkout@v4.2.2
14+
- uses: actions/checkout@v6.0.2
15+
with:
16+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
17+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
1618

1719
- name: Setup Ruby
18-
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
20+
uses: ruby/setup-ruby@v1.299.0
1921
with:
20-
bundler-cache: true
22+
bundler-cache: false
23+
24+
- name: Install dependencies
25+
run: bundle install
26+
27+
- name: Run RuboCop
28+
run: |
29+
bundle exec rubocop
30+
31+
autocorrect:
32+
if: github.event.pull_request.head.repo.full_name == github.repository
33+
runs-on: ubuntu-latest
34+
permissions:
35+
contents: write
36+
steps:
37+
- uses: actions/checkout@v6.0.2
38+
with:
39+
ref: ${{ github.event.pull_request.head.ref || github.ref }}
2140

22-
- name: Run linters
23-
uses: wearerequired/lint-action@548d8a7c4b04d3553d32ed5b6e91eb171e10e7bb # v2
24-
if: ${{ github.event_name == 'pull_request' }}
41+
- name: Setup Ruby
42+
uses: ruby/setup-ruby@v1.299.0
2543
with:
26-
auto_fix: true
27-
rubocop: true
28-
rubocop_command_prefix: bundle exec
44+
bundler-cache: true
45+
46+
- name: Run RuboCop with auto-correct
47+
run: |
48+
bundle exec rubocop -A
49+
50+
- name: Check for changes
51+
run: |
52+
git config --global user.name "github-actions[bot]"
53+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
54+
if git status --porcelain | grep .; then
55+
echo "changes=true" >> $GITHUB_ENV
56+
else
57+
echo "changes=false" >> $GITHUB_ENV
58+
fi
59+
60+
- name: Commit and push changes
61+
if: env.changes == 'true'
62+
run: |
63+
git add .
64+
git commit -m "chore: auto-corrected with RuboCop"
65+
git push

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
pull-requests: write # for actions/stale to close stale PRs
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/stale@v9.1.0
17+
- uses: actions/stale@v10.2.0
1818
with:
1919
stale-pr-message: >
2020
This pull request has been automatically marked as stale because it has not

.github/workflows/test.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,24 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
test_type:
20-
- collections
21-
- topics
22-
- all
19+
include:
20+
- test_type: topics
21+
- test_type: collections
22+
shard: 0
23+
total_shards: 4
24+
- test_type: collections
25+
shard: 1
26+
total_shards: 4
27+
- test_type: collections
28+
shard: 2
29+
total_shards: 4
30+
- test_type: collections
31+
shard: 3
32+
total_shards: 4
33+
- test_type: all
2334
runs-on: ubuntu-latest
2435
steps:
25-
- uses: actions/checkout@v4.2.2
36+
- uses: actions/checkout@v6.0.2
2637
with:
2738
fetch-depth: 0
2839

@@ -43,10 +54,21 @@ jobs:
4354

4455
- name: Setup Ruby
4556
if: ${{ steps.topics.outputs.changed || steps.collections.outputs.changed || steps.all.outputs.changed }}
46-
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
57+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
4758
with:
4859
bundler-cache: true
4960

61+
- name: Restore API cache
62+
if: |
63+
(matrix.test_type == 'collections' && steps.collections.outputs.changed) ||
64+
(matrix.test_type == 'all' && steps.all.outputs.changed)
65+
uses: actions/cache@v4
66+
with:
67+
path: .api-cache.json
68+
key: api-cache-${{ matrix.test_type }}-${{ github.run_id }}
69+
restore-keys: |
70+
api-cache-${{ matrix.test_type }}-
71+
5072
- name: Build and test with Rake
5173
if: |
5274
(matrix.test_type == 'topics' && steps.topics.outputs.changed) ||
@@ -58,3 +80,6 @@ jobs:
5880
TOPIC_FILES: ${{ steps.topics.outputs.changed }}
5981
COLLECTION_FILES: ${{ steps.collections.outputs.changed }}
6082
TEST_ALL_FILES: ${{ steps.all.outputs.changed }}
83+
SKIP_COLLECTION_API_CHECKS: ${{ matrix.test_type == 'all' && '1' || '' }}
84+
COLLECTION_SHARD: ${{ matrix.shard }}
85+
COLLECTION_TOTAL_SHARDS: ${{ matrix.total_shards }}

.github/workflows/topic-commenter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Comment on PR with topic info
21-
uses: actions/github-script@v7
21+
uses: actions/github-script@v8
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2424
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ vendor
88
.bundle
99
.idea
1010
.tool-versions
11+
.api-cache.json

Gemfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
source "https://rubygems.org"
22

3-
gem "faraday-retry", "~> 2.3.1"
3+
gem "faraday", "2.14.1"
4+
gem "faraday-retry", "2.4.0"
45
gem "github-pages", "~> 232", group: :jekyll_plugins
5-
gem "nokogiri", "~> 1.18.8"
6+
gem "json", "2.19.3"
7+
gem "language_server-protocol", "3.17.0.5"
8+
gem "nokogiri", "~> 1.19.2"
9+
gem "rake", "13.3.1"
10+
gem "rubocop", "1.86.0"
611

712
group :test do
813
gem "fastimage"
914
gem "httparty"
1015
gem "minitest"
1116
gem "octokit"
1217
gem "pry", require: false
13-
gem "rake"
14-
gem "rubocop"
1518
gem "rubocop-performance"
1619
gem "safe_yaml"
1720
end

0 commit comments

Comments
 (0)