gitlab_quality-test_tooling 0.3.0 → 0.4.0

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: 8d279ff4333f75a706c86e3eced4a8b95c7612be05b740479ea032b8c7f49a62
4
- data.tar.gz: 92783c9acf4188c3dc781c097f3d25073fc70abab6c503a4c8802a06fda1cfb2
3
+ metadata.gz: 4e917eea87f25727b389510a47d70ec930f02c201acf889efcb43b89b3d7060e
4
+ data.tar.gz: c7be66d7d4fdec18b8814c010e58a8a95474d9e6977e787c3b673d65892ea07c
5
5
  SHA512:
6
- metadata.gz: 0b0a7ab6ab95bb9356ddc3a5276a1b81083fe2056d102fc284d56e9b64890dcac5e76548f85dad95823bb0d1f8ceb1dc0ef0e4cb3e30ef7aad0ca11764a27b44
7
- data.tar.gz: c6b06b7040e97db27912113cab68d0161d51d311efe7ae7f5fb81b5f6ef55d7aec0a9d8df310f40f109b5a94d099e0e2be2e617a8119066f967e9efeaeb84a81
6
+ metadata.gz: 53b9854fb10540f4bff43a820f9fb4b13d6cd6f9e551390c0fba36a1a5a82db00bd701b84ffd4039b574c1d0504923232507428c2101bd61f893518ae6185fa0
7
+ data.tar.gz: 0d8847faab298bf0c9ed4a3174cc8bfa6d82c1392dd87cbe7ea8f5c88d48ace766d5018c14faeb4bb936236d027eed33e82b6744daaf527850726779da3fa433
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab_quality-test_tooling (0.3.0)
4
+ gitlab_quality-test_tooling (0.4.0)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.18.0)
7
7
  http (~> 5.0)
data/README.md CHANGED
@@ -36,6 +36,8 @@ Usage: exe/generate-test-session [options]
36
36
  -t, --token TOKEN A valid access token with `api` scope and Reporter permission in PROJECT
37
37
  -c CI_PROJECT_TOKEN, A valid access token with `read_api` scope permission in current ENV["CI_PROJECT_ID"]
38
38
  --ci-project-token
39
+ -f ISSUE_URL_FILE, Output the created test session issue URL
40
+ --issue-url-file
39
41
  --dry-run Perform a dry-run (don't create or update issues or test cases)
40
42
  -v, --version Show the version
41
43
  -h, --help Show the usage
@@ -27,6 +27,10 @@ options = OptionParser.new do |opts|
27
27
  params[:ci_project_token] = ci_project_token
28
28
  end
29
29
 
30
+ opts.on('-f', '--issue-url-file ISSUE_URL_FILE', 'Output the created test session issue URL') do |issue_url_file|
31
+ params[:issue_url_file] = issue_url_file
32
+ end
33
+
30
34
  opts.on('--dry-run', "Perform a dry-run (don't create or update issues or test cases)") do
31
35
  params[:dry_run] = true
32
36
  end
@@ -46,8 +50,12 @@ options = OptionParser.new do |opts|
46
50
  opts.parse(ARGV)
47
51
  end
48
52
 
53
+ issue_url_file = params.delete(:issue_url_file)
54
+
49
55
  if params.any?
50
- GitlabQuality::TestTooling::Report::GenerateTestSession.new(**params).invoke!
56
+ issue_url = GitlabQuality::TestTooling::Report::GenerateTestSession.new(**params).invoke!
57
+
58
+ File.write(issue_url_file, issue_url) if issue_url_file && issue_url
51
59
  else
52
60
  puts options
53
61
  exit 1
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitlabQuality
4
4
  module TestTooling
5
- VERSION = "0.3.0"
5
+ VERSION = "0.4.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_quality-test_tooling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-11 00:00:00.000000000 Z
11
+ date: 2023-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control