fastlane-plugin-logme 0.1.5 → 0.1.6
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/README.md +6 -5
- data/lib/fastlane/plugin/logme/actions/logme.rb +19 -3
- data/lib/fastlane/plugin/logme/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bccafd656f0e8cbec05d5a9980c02aa975ce8e6
|
4
|
+
data.tar.gz: 2c051a74a09ddfc40b9173c977dfe435e582a1b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 705c51fef606c301df6456a83c82ec9a48f9d074dc79162d0d190896ebf169eb5e2ada45b617dec9802adbd7cd737f00cc08bb2c7482df86e23b13c2a7b6a85c
|
7
|
+
data.tar.gz: 3e9af8625b9aa3f05ead353c89d3dde77e4b1bdab3f3d0a3655b64f7532d59d03df9b9b9159c8476c98d3811da50d045afbb397a92543e919969da42337f6ed8
|
data/README.md
CHANGED
@@ -19,11 +19,12 @@ Has we use a Continues Delivery, we need a way to create release notes automatic
|
|
19
19
|
## How to use it?
|
20
20
|
Just invoke *logme* in your Fastfile action. Logme will return the commit messages
|
21
21
|
|
22
|
-
| Option | Description | Optional |
|
23
|
-
|
24
|
-
| `to_revision` | End revision commit | false |
|
25
|
-
| `from_revision` | From revision commit | false |
|
26
|
-
| `message_regexp_filters` | Regexp filters like. ie '^MDM-\|^CTS:' | true |
|
22
|
+
| Option | Description | Optional | Default |
|
23
|
+
|---|---|---|---|
|
24
|
+
| `to_revision` | End revision commit | false | |
|
25
|
+
| `from_revision` | From revision commit | false | |
|
26
|
+
| `message_regexp_filters` | Regexp filters like. ie '^MDM-\|^CTS:' | true | `.` |
|
27
|
+
| `remove_commits_already_merged` | Remove commit messages already merged | true | `false` |
|
27
28
|
|
28
29
|
## Example
|
29
30
|
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
@@ -4,9 +4,20 @@ module Fastlane
|
|
4
4
|
|
5
5
|
def self.run(options)
|
6
6
|
regexp_filter = Regexp.new(options[:message_regexp_filters])
|
7
|
-
Actions.sh("git log --pretty
|
8
|
-
|
9
|
-
|
7
|
+
changes = Actions.sh("git log --pretty=\"%s\" --no-merges #{options[:from_revision]}...#{options[:to_revision]}")
|
8
|
+
.split(/\n/)
|
9
|
+
|
10
|
+
if options[:remove_commits_already_merged]
|
11
|
+
merges = Actions.sh("git log --pretty=\"%b\" --merges #{options[:from_revision]}...#{options[:to_revision]}")
|
12
|
+
.split("* commit")
|
13
|
+
|
14
|
+
merges.delete_at(0) # empty value
|
15
|
+
merges.delete_at(0) # last merge
|
16
|
+
merges = merges.join("\n")
|
17
|
+
changes.delete_if{|commit| merges.include?(commit) }
|
18
|
+
end
|
19
|
+
|
20
|
+
changes.select{|message| message[regexp_filter] != nil}
|
10
21
|
.join("\n\r")
|
11
22
|
end
|
12
23
|
|
@@ -29,6 +40,11 @@ module Fastlane
|
|
29
40
|
FastlaneCore::ConfigItem.new(key: :message_regexp_filters,
|
30
41
|
description: "Regexp filters like. ie '^MDM-|^CTS:'",
|
31
42
|
default_value: '.',
|
43
|
+
optional: true),
|
44
|
+
FastlaneCore::ConfigItem.new(key: :remove_commits_already_merged,
|
45
|
+
description: 'Remove commit messages already merged',
|
46
|
+
default_value: false,
|
47
|
+
is_string: false,
|
32
48
|
optional: true)
|
33
49
|
]
|
34
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-logme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luís Esteves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|