Skip to content

Use a sentinel error when blocking paths for RepositoriesServices.GetContents#2837

Merged
gmlewis merged 1 commit intogoogle:masterfrom
k0ral:sentinel
Jul 21, 2023
Merged

Use a sentinel error when blocking paths for RepositoriesServices.GetContents#2837
gmlewis merged 1 commit intogoogle:masterfrom
k0ral:sentinel

Conversation

@k0ral
Copy link
Copy Markdown
Contributor

@k0ral k0ral commented Jul 21, 2023

Related to #2805 (comment) .

This allows users to catch this specific error using errors.Is.

…ces.GetContents`

This allows users to catch this specific error using `errors.Is`.
@gmlewis gmlewis changed the title feat: Use a sentinel error when blocking paths for RepositoriesServices.GetContents Use a sentinel error when blocking paths for RepositoriesServices.GetContents Jul 21, 2023
Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @k0ral !
LGTM.
Merging.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 21, 2023

Codecov Report

Merging #2837 (995c57e) into master (b02bb75) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2837   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         137      137           
  Lines       12291    12291           
=======================================
  Hits        12053    12053           
  Misses        162      162           
  Partials       76       76           
Impacted Files Coverage Δ
github/repos_contents.go 87.82% <100.00%> (ø)

@gmlewis gmlewis merged commit c030d43 into google:master Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants