Skip to content

Commit

Permalink
Merge pull request #29 from github/bug/ignore_not_found
Browse files Browse the repository at this point in the history
Bug: Support cases where `ignore_not_found` is not provided
  • Loading branch information
GrantBirki committed Jan 8, 2024
2 parents 94f8e48 + 2484924 commit 1e87a3c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
entitlements-github-plugin (0.5.0)
entitlements-github-plugin (0.5.1)
contracts (~> 0.17.0)
faraday (~> 2.0)
faraday-retry (~> 2.0)
Expand Down
11 changes: 6 additions & 5 deletions lib/entitlements/backend/github_team/service.rb
Expand Up @@ -18,18 +18,19 @@ class TeamNotFound < RuntimeError; end

# Constructor.
#
# addr - Base URL a GitHub Enterprise API (leave undefined to use dotcom)
# org - String with organization name
# token - Access token for GitHub API
# ou - Base OU for fudged DNs
# addr - Base URL a GitHub Enterprise API (leave undefined to use dotcom)
# org - String with organization name
# token - Access token for GitHub API
# ou - Base OU for fudged DNs
# ignore_not_found - Boolean to ignore not found errors
#
# Returns nothing.
Contract C::KeywordArgs[
addr: C::Maybe[String],
org: String,
token: String,
ou: String,
ignore_not_found: C::Bool,
ignore_not_found: C::Maybe[C::Bool],
] => C::Any
def initialize(addr: nil, org:, token:, ou:, ignore_not_found: false)
super
Expand Down
11 changes: 6 additions & 5 deletions lib/entitlements/service/github.rb
Expand Up @@ -21,18 +21,19 @@ class GitHub

# Constructor.
#
# addr - Base URL a GitHub Enterprise API (leave undefined to use dotcom)
# org - String with organization name
# token - Access token for GitHub API
# ou - Base OU for fudged DNs
# addr - Base URL a GitHub Enterprise API (leave undefined to use dotcom)
# org - String with organization name
# token - Access token for GitHub API
# ou - Base OU for fudged DNs
# ignore_not_found - Boolean to ignore not found errors
#
# Returns nothing.
Contract C::KeywordArgs[
addr: C::Maybe[String],
org: String,
token: String,
ou: String,
ignore_not_found: C::Bool,
ignore_not_found: C::Maybe[C::Bool],
] => C::Any
def initialize(addr: nil, org:, token:, ou:, ignore_not_found: false)
# Save some parameters for the connection but don't actually connect yet.
Expand Down
2 changes: 1 addition & 1 deletion lib/version.rb
Expand Up @@ -2,6 +2,6 @@

module Entitlements
module Version
VERSION = "0.5.0"
VERSION = "0.5.1"
end
end

0 comments on commit 1e87a3c

Please sign in to comment.