mergem 0.0.1 → 0.0.2
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/.github/workflows/cron.yml +9 -2
- data/.github/workflows/rake.yml +0 -4
- data/bin/mergem +6 -1
- data/lib/mergem/askrultor.rb +3 -0
- data/lib/mergem/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd0693ba937a1a8efeb0f7a595e926513cf6c1b1c0a418290de309ff497e9736
|
4
|
+
data.tar.gz: 4f5924d99386028c17b4ccb99477d8cf8cc77161a337511ecf510dfcb801d428
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b165ed9e1f03ce100f82cb44a06b3ba39c92cffbb34639c313cb3f46e1158cc791e2b8562cfe32e3a28aecd5e62dbb0b5798e904dd68cf8f10311fd44dd09193
|
7
|
+
data.tar.gz: 707240dee88bdd74e85c2c59526d5434386ceaf8d7fff3247fa3965bddbd9f8cc640336a167387c74cd9a718b2c15bbf872ce706626d9ccd83dd0a08480e5920
|
data/.github/workflows/cron.yml
CHANGED
@@ -2,14 +2,21 @@
|
|
2
2
|
name: cron
|
3
3
|
on:
|
4
4
|
schedule:
|
5
|
-
- cron: '
|
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:
|
19
|
+
- run: |
|
20
|
+
bin/mergem --verbose --token=${{ secrets.TOKEN }} \
|
21
|
+
--repo=yegor256/mergem \
|
22
|
+
--repo=yegor256/iri
|
data/.github/workflows/rake.yml
CHANGED
data/bin/mergem
CHANGED
@@ -83,7 +83,12 @@ end
|
|
83
83
|
|
84
84
|
begin
|
85
85
|
cache = File.absolute_path(opts[:cache])
|
86
|
-
|
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
|
data/lib/mergem/askrultor.rb
CHANGED
@@ -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?
|
data/lib/mergem/version.rb
CHANGED