gitlab_awesome_release 0.1.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env.gitlab.example +1 -1
- data/CHANGELOG.md +7 -1
- data/README.md +5 -5
- data/lib/gitlab_awesome_release/cli.rb +1 -1
- data/lib/gitlab_awesome_release/project.rb +2 -9
- data/lib/gitlab_awesome_release/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: a979bdde04b5ca5d62dff7ec28e985cca5e25073
|
4
|
+
data.tar.gz: 503eafbd5ad0b00e5dd515347918c376924b2318
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdf228b744476dd9499069824ce00485dd861d0e98d2d13b82a96c5772add70c8a74f0c62340e74421277f12963839cdba5c6c1b16d54354fffa02b757e0b897
|
7
|
+
data.tar.gz: 4a7aa43a91b60bbcf6f9f15723e6e87e279ca36fb44fc2bebdc0a2b11acf35784bf125e3bbdcfde809f54248cdc93308696aaa0bb4abc73314ab117f1d18d3bc
|
data/.env.gitlab.example
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v0.1.
|
2
|
+
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v0.1.2...HEAD)
|
3
3
|
|
4
4
|
|
5
|
+
## v0.1.2
|
6
|
+
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v0.1.1...v0.1.2)
|
7
|
+
|
8
|
+
* Run rubocop only latest ruby [!26](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/26) *@sue445*
|
9
|
+
* Fixed. can not call GitLab API using gitlab v4+ [!27](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/27) *@sue445*
|
10
|
+
|
5
11
|
## v0.1.1
|
6
12
|
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v0.1.0...v0.1.1)
|
7
13
|
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ $ gitlab_awesome_release create_note --filename=CHANGELOG.md
|
|
43
43
|
All options can be specified in both the command arguments and environment variables
|
44
44
|
|
45
45
|
* `--gitlab-api-endpoint` , `GITLAB_API_ENDPOINT` **(either one is required)**
|
46
|
-
* GitLab API endpoint (e.g. `http://example.com/api/
|
46
|
+
* GitLab API endpoint (e.g. `http://example.com/api/v4`)
|
47
47
|
* `--gitlab-api-private-token` , `GITLAB_API_PRIVATE_TOKEN` **(either one is required)**
|
48
48
|
* Your private token. see [/profile/account](img/private_token.png)
|
49
49
|
* `--gitlab-project-name` , `GITLAB_PROJECT_NAME` **(either one is required)**
|
@@ -75,7 +75,7 @@ $ gitlab_awesome_release create_latest_note
|
|
75
75
|
All options can be specified in both the command arguments and environment variables
|
76
76
|
|
77
77
|
* `--gitlab-api-endpoint` , `GITLAB_API_ENDPOINT` **(either one is required)**
|
78
|
-
* GitLab API endpoint (e.g. `http://example.com/api/
|
78
|
+
* GitLab API endpoint (e.g. `http://example.com/api/v4`)
|
79
79
|
* `--gitlab-api-private-token` , `GITLAB_API_PRIVATE_TOKEN` **(either one is required)**
|
80
80
|
* Your private token. see [/profile/account](img/private_token.png)
|
81
81
|
* `--gitlab-project-name` , `GITLAB_PROJECT_NAME` **(either one is required)**
|
@@ -103,7 +103,7 @@ $ gitlab_awesome_release marking --from-tag=v0.1.0 --to-tag=v0.2.0
|
|
103
103
|
All options can be specified in both the command arguments and environment variables
|
104
104
|
|
105
105
|
* `--gitlab-api-endpoint` , `GITLAB_API_ENDPOINT` **(either one is required)**
|
106
|
-
* GitLab API endpoint (e.g. `http://example.com/api/
|
106
|
+
* GitLab API endpoint (e.g. `http://example.com/api/v4`)
|
107
107
|
* `--gitlab-api-private-token` , `GITLAB_API_PRIVATE_TOKEN` **(either one is required)**
|
108
108
|
* Your private token. see [/profile/account](img/private_token.png)
|
109
109
|
* `--gitlab-project-name` , `GITLAB_PROJECT_NAME` **(either one is required)**
|
@@ -122,10 +122,10 @@ All options can be specified in both the command arguments and environment varia
|
|
122
122
|
## ProTip
|
123
123
|
Environment variables read from `~/.env.gitlab` and current `.env.gitlab`
|
124
124
|
|
125
|
-
`~/.env.gitlab`
|
125
|
+
`~/.env.gitlab`
|
126
126
|
|
127
127
|
```
|
128
|
-
GITLAB_API_ENDPOINT=http://example.com/api/
|
128
|
+
GITLAB_API_ENDPOINT=http://example.com/api/v4
|
129
129
|
GITLAB_API_PRIVATE_TOKEN=XXXXXXXXXXXXXXXXXXX
|
130
130
|
ALLOW_TAG_FORMAT=^v?[\d.]+
|
131
131
|
```
|
@@ -9,7 +9,7 @@ module GitlabAwesomeRelease
|
|
9
9
|
DEFAULT_VERSION_FORMAT = "^v?[\\d.]+".freeze
|
10
10
|
GITLAB_ENV_FILES = %w(.env.gitlab ~/.env.gitlab).freeze
|
11
11
|
|
12
|
-
GITLAB_API_DESCRIPTION = "GitLab API endpoint (e.g. http://example.com/api/
|
12
|
+
GITLAB_API_DESCRIPTION = "GitLab API endpoint (e.g. http://example.com/api/v4)".freeze
|
13
13
|
GITLAB_API_PRIVATE_TOKEN_DESCRIPTION = "Your private token".freeze
|
14
14
|
GITLAB_API_PROJECT_NAME = "Target project (e.g. group/repo_name)".freeze
|
15
15
|
LOG_LEVEL_DESCRIPTION = "Log level (debug|info|warn|error|fatal|unknown)".freeze
|
@@ -119,16 +119,14 @@ module GitlabAwesomeRelease
|
|
119
119
|
|
120
120
|
# find MergeRequest with iid
|
121
121
|
def merge_request(iid)
|
122
|
-
|
123
|
-
assert_merge_request_iid(mr, iid) if mr
|
124
|
-
mr
|
122
|
+
Gitlab.merge_request(@project_name, iid)
|
125
123
|
end
|
126
124
|
|
127
125
|
def add_merge_request_label(mr, label)
|
128
126
|
labels = mr.labels
|
129
127
|
labels << label
|
130
128
|
|
131
|
-
Gitlab.update_merge_request(@project_name, mr.
|
129
|
+
Gitlab.update_merge_request(@project_name, mr.iid, labels: labels.uniq.join(","))
|
132
130
|
@logger.info "Add [#{label}] to !#{mr.iid} #{mr.title}"
|
133
131
|
end
|
134
132
|
|
@@ -154,10 +152,5 @@ module GitlabAwesomeRelease
|
|
154
152
|
str << merge_request_summary(iid) + "\n"
|
155
153
|
end
|
156
154
|
end
|
157
|
-
|
158
|
-
def assert_merge_request_iid(mr, iid)
|
159
|
-
# NOTE: MR is found, but server is old GitLab?
|
160
|
-
raise "MergeRequest iid does not match (expected #{iid}, but #{mr.iid})" unless iid == mr.iid
|
161
|
-
end
|
162
155
|
end
|
163
156
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_awesome_release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|