gitlab_awesome_release 0.1.2 → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 814f4bfd082e2e584f22aaec1ce94c2c74a7ed1a
4
- data.tar.gz: 014de5f3e5802946ee6664ae3949850609f99ffd
3
+ metadata.gz: a979bdde04b5ca5d62dff7ec28e985cca5e25073
4
+ data.tar.gz: 503eafbd5ad0b00e5dd515347918c376924b2318
5
5
  SHA512:
6
- metadata.gz: 29956f86993eb20147b11e0eb5b90ba5cced46fd6a9c9604ca7d6876371f209692442881196ca168e67865a6004f278d429781221487e622868ab9aaf2e044fd
7
- data.tar.gz: 695570a8bb6a9847a9464e1aecf8e8ed7773615f6ebddaf62b095174ac532234755d35814b7307c3f0776ae4d25d88dfb4a624eed2c591b2b9a5aedb6d64bd13
6
+ metadata.gz: fdf228b744476dd9499069824ce00485dd861d0e98d2d13b82a96c5772add70c8a74f0c62340e74421277f12963839cdba5c6c1b16d54354fffa02b757e0b897
7
+ data.tar.gz: 4a7aa43a91b60bbcf6f9f15723e6e87e279ca36fb44fc2bebdc0a2b11acf35784bf125e3bbdcfde809f54248cdc93308696aaa0bb4abc73314ab117f1d18d3bc
@@ -1,4 +1,4 @@
1
- GITLAB_API_ENDPOINT=http://example.com/api/v3
1
+ GITLAB_API_ENDPOINT=http://example.com/api/v4
2
2
  GITLAB_API_PRIVATE_TOKEN=XXXXXXXXXXXXXXXXXXX
3
3
  GITLAB_PROJECT_NAME=group/name
4
4
  ALLOW_TAG_FORMAT=^v?[\d.]+
@@ -1,7 +1,13 @@
1
1
  ## Unreleased
2
- [full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v0.1.1...HEAD)
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/v3`)
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/v3`)
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/v3`)
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/v3
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/v3)".freeze
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
- mr = Gitlab.merge_requests(@project_name, iid: iid).first
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.id, labels: labels.uniq.join(","))
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
@@ -1,3 +1,3 @@
1
1
  module GitlabAwesomeRelease
2
- VERSION = "0.1.2".freeze
2
+ VERSION = "1.0.0".freeze
3
3
  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.1.2
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-05-31 00:00:00.000000000 Z
11
+ date: 2017-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv