Skip to content

Commit c4aca9b

Browse files
Dxuiangithub-actions[bot]jbampton
authored
seek.rb add search on classification (slurpcode#2788)
--------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: John Bampton <[email protected]>
1 parent 31a0369 commit c4aca9b

File tree

6 files changed

+1682
-13
lines changed

6 files changed

+1682
-13
lines changed

.github/workflows/weekly_run.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Weekly Ruby Script Runner
2+
3+
on:
4+
# for testing purposes
5+
push:
6+
branches:
7+
- main
8+
schedule:
9+
- cron: '0 0 * * 0' # Runs every weekend
10+
11+
jobs:
12+
run-scripts:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/[email protected]
17+
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: 3.3.4
22+
23+
- name: Install mechanize gem
24+
run: |
25+
gem install mechanize;
26+
27+
- name: Run new.rb script
28+
id: run-new-rb-script
29+
run: |
30+
ruby seek/new.rb;
31+
exit_code=$?;
32+
echo "new.rb exit code: $exit_code";
33+
echo "exit_code=$exit_code" >> $GITHUB_ENV;
34+
if [ $exit_code -eq 0 ]; then
35+
echo "new.rb succeeded.";
36+
else
37+
echo "new.rb failed with exit code $exit_code.";
38+
exit $exit_code; # Exit with the last exit code
39+
fi;
40+
41+
- name: Commit and push changes if any
42+
if: env.exit_code == '0'
43+
run: |
44+
git config --global user.name "github-actions[bot]";
45+
git config --global user.email "github-actions[bot]@users.noreply.github.com";
46+
git add seek/job_ind.json;
47+
if git diff-index --quiet HEAD; then
48+
echo "No changes to commit.";
49+
else
50+
git commit -m "Update seek/job_ind.json";
51+
git push origin main;
52+
fi;

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
- id: debug-statements
2828
- id: detect-private-key
2929
- id: end-of-file-fixer
30-
exclude: ^charts/assets/.*$|^charts/lang/README\.de\.md$|^charts/log\.txt$|^charts/README\.md$|^docs/assets/js/.*$|^docs/assets/games/.*$|rubycritic/.*$
30+
exclude: ^charts/assets/.*$|^charts/lang/README\.de\.md$|^charts/log\.txt$|^charts/README\.md$|^docs/assets/js/.*$|^docs/assets/games/.*$|^rubycritic/.*$|^seek/job_ind\.json$
3131
- id: file-contents-sorter
3232
files: ^requirements.txt$
3333
args: [--unique]
@@ -101,7 +101,7 @@ repos:
101101
hooks:
102102
- id: codespell
103103
entry: codespell -I codespell.txt ./doc/source
104-
exclude: ^assets/.*$|^charts/.*$|^docs/assets/.*$|^eclipse-cheatsheets-to-dita-to-pdf/.*$|^Gemfile\.lock$|^go\.sum$|^go\.work\.sum$|^logorama/.*$|^rubycritic/.*$|^ruby-eclipse-cheatsheets-to-dita/.*$|^tests/spelling/.*$
104+
exclude: ^assets/.*$|^charts/.*$|^docs/assets/.*$|^eclipse-cheatsheets-to-dita-to-pdf/.*$|^Gemfile\.lock$|^go\.sum$|^go\.work\.sum$|^logorama/.*$|^rubycritic/.*$|^ruby-eclipse-cheatsheets-to-dita/.*$|^tests/spelling/.*$|^seek/job_ind\.json$
105105
# - repo: https://github.com/syntaqx/git-hooks
106106
# rev: v0.0.16
107107
# hooks:

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ Metrics/AbcSize:
3333
Metrics/BlockLength:
3434
Max: 45
3535

36+
Metrics/ClassLength:
37+
Max: 120
38+
3639
Metrics/CyclomaticComplexity:
3740
Enabled: false
3841

0 commit comments

Comments
 (0)