gitlab_support_readiness 1.0.74 → 1.0.75

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
  SHA256:
3
- metadata.gz: 6b3f87e5a80045ca0cd3f959d9e6b3e2afb6dfa08ae7e3954b9b73cb65fe1f03
4
- data.tar.gz: 80d6535997df8341d0bb23dadb13b31057467197438d4ddfa805fe083b5fb4dd
3
+ metadata.gz: b5a9270d4b584057c87945a396c53986f418b93ef85cfbe2570303042f29b511
4
+ data.tar.gz: 2267d9e98eef359457e9ee4c77ea5c278d80fbbc4773e48022cb2f35ac4de877
5
5
  SHA512:
6
- metadata.gz: '0947da13e747aeff24ba01433326d3b3ef1a8e2a155a1669453b29da532b3a8aa116fc94c43de4ced83f188b5fed901511abe72e452f2d1309301f4dbd22def2'
7
- data.tar.gz: b04699bb4fe318b9d4382767ca4e65516982c684d6503d1bc275b5dfa21169200469087d6856900df46f110f5caaa1add7a6029616ee3ce8b09c37c9c94b307a
6
+ metadata.gz: 9b8619ea9ba4a9a1e1e5e93b8973478fc4ded297df66703d248d1390b5f49f3b319d0c051629b9256643d753184d89379a3f5ab9b4e7d072f276d8de075279b8
7
+ data.tar.gz: da9274ea65b7295ae8e4d1af540f6e609b677318b68254a40b3d768d29f8317a9be0d6819695553c707ac5a50d004851b8ccb17c108fe248d367bfc9e762c946
@@ -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.75
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