mergem 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8544f1985d8470a64aa5f012576351d4f18592adbf74f4fd54035f541aadd4cd
4
- data.tar.gz: c969c24ddb79efca6b15f7d91652eeb5c9ef9d5c3b0de6f779d4b0809cfcdcbc
3
+ metadata.gz: dd0693ba937a1a8efeb0f7a595e926513cf6c1b1c0a418290de309ff497e9736
4
+ data.tar.gz: 4f5924d99386028c17b4ccb99477d8cf8cc77161a337511ecf510dfcb801d428
5
5
  SHA512:
6
- metadata.gz: f72c7388b4b5e194352fd96b28c0248a2e92a23122daa27f657b50f45a9332ef35f4ffae3ac31aae319bd4baf64de00c1d2955526c7d3f55dc7c230a10bcf86b
7
- data.tar.gz: 6c7e2018f6d6b80a82c120ecb5326e26a3612d3391899ad0ffe2078fc2e1a0e1e4e606f12b085e6f18cc1d471d3048f353335ba42167f666d83942304480b692
6
+ metadata.gz: b165ed9e1f03ce100f82cb44a06b3ba39c92cffbb34639c313cb3f46e1158cc791e2b8562cfe32e3a28aecd5e62dbb0b5798e904dd68cf8f10311fd44dd09193
7
+ data.tar.gz: 707240dee88bdd74e85c2c59526d5434386ceaf8d7fff3247fa3965bddbd9f8cc640336a167387c74cd9a718b2c15bbf872ce706626d9ccd83dd0a08480e5920
@@ -2,14 +2,21 @@
2
2
  name: cron
3
3
  on:
4
4
  schedule:
5
- - cron: '*/15 * * * *'
5
+ - cron: '0,15,30,45 * * * *'
6
6
  jobs:
7
7
  cron:
8
8
  runs-on: ubuntu-20.04
9
9
  steps:
10
10
  - uses: actions/checkout@v3
11
+ - uses: actions/cache@v3
12
+ with:
13
+ path: .mergem-cache
14
+ key: main
11
15
  - uses: ruby/setup-ruby@v1
12
16
  with:
13
17
  ruby-version: ${{ matrix.ruby }}
14
18
  - run: bundle update
15
- - run: bin/mergem --repo=yegor256/mergem --token=${{ secrets.TOKEN }}
19
+ - run: |
20
+ bin/mergem --verbose --token=${{ secrets.TOKEN }} \
21
+ --repo=yegor256/mergem \
22
+ --repo=yegor256/iri
@@ -16,10 +16,6 @@ jobs:
16
16
  runs-on: ${{ matrix.os }}
17
17
  steps:
18
18
  - uses: actions/checkout@v3
19
- - uses: actions/cache@v3
20
- with:
21
- path: .mergem-cache
22
- key: main
23
19
  - uses: ruby/setup-ruby@v1
24
20
  with:
25
21
  ruby-version: ${{ matrix.ruby }}
data/bin/mergem CHANGED
@@ -83,7 +83,12 @@ end
83
83
 
84
84
  begin
85
85
  cache = File.absolute_path(opts[:cache])
86
- loog.debug("Cache file is #{cache}")
86
+ if File.exist?(cache)
87
+ loog.debug("Cache file is '#{cache}' (#{File.readlines(cache)} lines)")
88
+ else
89
+ File.write(cache, '')
90
+ loog.debug("Cache file '#{cache}' was absent")
91
+ end
87
92
  api = api(opts, loog)
88
93
  if opts.dry?
89
94
  total = 1
@@ -26,6 +26,7 @@ class Mergem::AskRultor
26
26
  def initialize(api, loog)
27
27
  @api = api
28
28
  @loog = loog
29
+ @bots = ['renovate[bot]']
29
30
  end
30
31
 
31
32
  def ask(repo, num)
@@ -35,6 +36,8 @@ class Mergem::AskRultor
35
36
  user = 'yegor256'
36
37
  @loog.debug('You are not using GitHub token...')
37
38
  end
39
+ issue = @api.issue(repo, num)
40
+ return false unless @bots.include?(issue[:user][:login])
38
41
  json = @api.issue_comments(repo, num)
39
42
  @loog.debug("Found #{json.count} comments in #{repo}##{num}")
40
43
  return false unless json.find { |j| j[:user][:login] == user }.nil?
@@ -23,5 +23,5 @@
23
23
  # Copyright:: Copyright (c) 2022 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Mergem
26
- VERSION = '0.0.1'.freeze
26
+ VERSION = '0.0.2'.freeze
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mergem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko