gitlab_support_readiness 1.0.74 → 1.0.76

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: 6b3f87e5a80045ca0cd3f959d9e6b3e2afb6dfa08ae7e3954b9b73cb65fe1f03
4
- data.tar.gz: 80d6535997df8341d0bb23dadb13b31057467197438d4ddfa805fe083b5fb4dd
3
+ metadata.gz: b7dbd21d0da73dda80fe90aa0c7878e19be766517b3763b269e9eae5f66e062c
4
+ data.tar.gz: 40a74c30a45187f20973cb5420a2007616d1b2bfa9ce1ad124eb0657af90d31a
5
5
  SHA512:
6
- metadata.gz: '0947da13e747aeff24ba01433326d3b3ef1a8e2a155a1669453b29da532b3a8aa116fc94c43de4ced83f188b5fed901511abe72e452f2d1309301f4dbd22def2'
7
- data.tar.gz: b04699bb4fe318b9d4382767ca4e65516982c684d6503d1bc275b5dfa21169200469087d6856900df46f110f5caaa1add7a6029616ee3ce8b09c37c9c94b307a
6
+ metadata.gz: 51e92d0e284b57767862fe1ab6b8e234316609ec36cc77553bced33d87e52b0d9981c7810644ccf692e86ba4df5654841ccdaaf1495d51b1e907d4031314c108
7
+ data.tar.gz: f949a11f994092b4eb83915b40ac1e3185ddbef2f5c5e4bb60b50fa244d79988244e715c24daa0b3b2f50484ddeafc9f3c32e8a643ce50b14ecb9df44d2fb344
@@ -39,7 +39,6 @@ module Readiness
39
39
  item: repo[:item].name,
40
40
  variant: v
41
41
  }
42
- @diffs[:variant_creates].push(object)
43
42
  end
44
43
  else
45
44
  comparable_zd = zd.dup
@@ -24,9 +24,37 @@ module Readiness
24
24
  issue.description = team_member_license_message
25
25
  create = Readiness::GitLab::Issues.create!(@gitlab_client, project, issue)
26
26
  puts "Issue created: #{create.web_url}"
27
+ if Date.parse(expiration) > Date.today + 1.years
28
+ comment_params = {
29
+ body: over_a_year_comment
30
+ }
31
+ Readiness::GitLab::Issues.create_comment!(@gitlab_client, project, create, comment_params)
32
+ end
27
33
  exit 0
28
34
  end
29
35
 
36
+ ##
37
+ # Returns a String used for a comment body
38
+ #
39
+ # @author Jason Colyer
40
+ # @since 1.0.75
41
+ def self.over_a_year_comment
42
+ <<~STRING
43
+ Greetings @#{requester.username} !
44
+
45
+ We have detected the license you are requesting would have an expiration date over the standard allowance of one year.
46
+
47
+ To proceed, please take one of the following actions:
48
+
49
+ - Comment stating the maximum standard allowance of one year (#{Date.today + 1.years}) is acceptable
50
+ - Comment explaining the reason for an exception to the maximum standard allowance of one year (#{Date.today + 1.years})
51
+
52
+ Please note without one of the above actions being done, we would not be able to proceed on this request.
53
+
54
+ Thanks!
55
+ STRING
56
+ end
57
+
30
58
  ##
31
59
  # Sets the global variable requester
32
60
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_support_readiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.74
4
+ version: 1.0.76
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Colyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-11 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport