gitlab-username_bot_identifier 2.1.1 → 2.2.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
  SHA256:
3
- metadata.gz: d721a8e3467b093401f3ea1ad831ed97f0456ba756c793a2c23c29d45f4b90f9
4
- data.tar.gz: d7e7e302f5186354382a6e7c0e3acaea2e88cc62141c00bf76f9f2de4b44f111
3
+ metadata.gz: c13c124abd3cda5da49ee2a8ed012eedb5dc1933d4937228efc7534809fe05a0
4
+ data.tar.gz: 8ecea796a996860474f30f78d371523358a6b57c6fcb4802349afd6d6232c84e
5
5
  SHA512:
6
- metadata.gz: aa633b9e77425232272917513877c2ea0c0589c5735d6bdaac354698bf6da3d2b87e915118c6e1dcb23b121bbeb043558ca0e13cd0055a717ee97d6575e206f6
7
- data.tar.gz: 6993bab32b22feee183880b0505530ac35578028df30aac6368b85574ea79df25fe0e9fbd4c4c8707d3cc8a8c5625d009689a0f4d8b5996ccc7be058d9da7747
6
+ metadata.gz: 9440770e67e137bfef1405f4c0e0e29c4cad87cf7ad7954af2b8fbc3c9ba2284c927861bd181a7cc0c0feb1ea8cb4738518341bd295458660d80ecd4af1620bb
7
+ data.tar.gz: d8a5799c1f0a931759199eaec6c33c02235a559f66aeda4e78393452510fa93b6f8719f06305abadd98933302bc9a620b63c58b29d43202163ad5416b57c17d3
@@ -39,7 +39,7 @@ module Gitlab
39
39
  # Can be spoofed (e.g. someone can register project_1_bot, project_2_bot_abc123)
40
40
  PROJECT_ACCESS_TOKEN_REGEX = /^project_\d+_bot_?\w*$/.freeze
41
41
  GROUP_ACCESS_TOKEN_REGEX = /^group_\d+_bot_?\w*$/.freeze
42
- SERVICE_ACCOUNT_REGEX = /^service_account_group_\d+_?\w*$/.freeze
42
+ SERVICE_ACCOUNT_REGEX = /^service_account_(group|project)_\d+_?\w*$/.freeze
43
43
 
44
44
  # Used as best practice by GitLab team members when creating "service accounts"
45
45
  KNOWN_SERVICE_ACCOUNT_REGEX = /^gl-service-[-\w]+$/.freeze
@@ -79,7 +79,8 @@ module Gitlab
79
79
  username.match?(GROUP_ACCESS_TOKEN_REGEX)
80
80
  end
81
81
 
82
- # "service accounts" are accounts that were created through the service accounts feature.
82
+ # "service accounts" are accounts created through the service accounts feature,
83
+ # scoped to either a group or a project.
83
84
  # See https://docs.gitlab.com/ee/user/profile/service_accounts.html
84
85
  def service_account?
85
86
  username.match?(SERVICE_ACCOUNT_REGEX)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-username_bot_identifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Tickett