From 9a97b99a845ec3efcd7331693d738335b6131561 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 7 Jun 2024 14:32:51 +0300 Subject: [PATCH] up --- .../workflows/{license.yml => copyrights.yml} | 33 ++----------------- Gemfile.lock | 4 +-- judges/github-events/scan-live.yml | 4 +-- lib/octo.rb | 10 +++--- 4 files changed, 12 insertions(+), 39 deletions(-) rename .github/workflows/{license.yml => copyrights.yml} (58%) diff --git a/.github/workflows/license.yml b/.github/workflows/copyrights.yml similarity index 58% rename from .github/workflows/license.yml rename to .github/workflows/copyrights.yml index ab22ef019..284b135ea 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/copyrights.yml @@ -20,40 +20,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. --- -name: license +name: copyrights 'on': push: - branches: - - master pull_request: - branches: - - master jobs: - license: + copyrights: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - shell: bash - run: | - header="Copyright (c) $(date +%Y) Zerocracy" - failed="false" - while IFS= read -r file; do - if ! grep -q "${header}" "${file}"; then - failed="true" - echo "⚠️ Copyright header is not found in: ${file}" - else - echo "File looks good: ${file}" - fi - done < <(find . -type f \( \ - -name "Dockerfile" -o \ - -name "LICENSE.txt" -o \ - -name "Makefile" -o \ - -name "Rakefile" -o \ - -name "*.sh" -o \ - -name "*.rb" -o \ - -name "*.fe" -o \ - -name "*.yml" \ - \) -print) - if [ "${failed}" = "true" ]; then - exit 1 - fi + - uses: yegor256/copyrights-action@0.0.3 diff --git a/Gemfile.lock b/Gemfile.lock index 2e6f3835c..c862600fb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GEM concurrent-ruby (1.2.3) ethon (0.16.0) ffi (>= 1.15.0) - factbase (0.0.43) + factbase (0.0.44) json (~> 2.7) loog (~> 0.2) nokogiri (~> 1.10) @@ -27,7 +27,7 @@ GEM gli (2.21.1) iri (0.8.0) json (2.7.2) - judges (0.5.0) + judges (0.6.0) backtrace (~> 0.3) concurrent-ruby (= 1.2.3) factbase (~> 0.0) diff --git a/judges/github-events/scan-live.yml b/judges/github-events/scan-live.yml index 649ee1483..1b7ce279c 100644 --- a/judges/github-events/scan-live.yml +++ b/judges/github-events/scan-live.yml @@ -22,10 +22,10 @@ --- category: live options: - max_events: 1 + max_events: 10 repositories: yegor256/judges expected: - - /fb[count(f)=1] + - /fb/f[what='github-events'] - /fb/f/event_id - /fb/f/when - /fb/f/what diff --git a/lib/octo.rb b/lib/octo.rb index 6ae1b0571..2f40c44cf 100644 --- a/lib/octo.rb +++ b/lib/octo.rb @@ -43,14 +43,14 @@ def octo o.auto_paginate = true o.connection_options = { request: { - open_timeout: 5, - timeout: 5 + open_timeout: 15, + timeout: 15 } } stack = Faraday::RackBuilder.new do |builder| - builder.use Faraday::HttpCache, serializer: Marshal, shared_cache: false - builder.use Octokit::Response::RaiseError - builder.adapter Faraday.default_adapter + builder.use(Faraday::HttpCache, serializer: Marshal, shared_cache: true) + builder.use(Octokit::Response::RaiseError) + builder.adapter(Faraday.default_adapter) end o.middleware = stack o = Obk.new(o, pause: 1000)