Skip to content

Add RepositoryArchived exception #2507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2022
Merged

Add RepositoryArchived exception #2507

merged 1 commit into from
Feb 6, 2022

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Feb 6, 2022

This wraps UnexpectedResponses on PR creation in the newly added
RepositoryArchived exception if the repository has been archived.
This makes it easier to extract the archived repositories from the
logs.

Here is an example from the log output:

[info] 2022-02-06 13:29:41,768 ERROR Steward xxx/yyy failed
[info] org.scalasteward.core.vcs.github.GitHubException$RepositoryArchived: xxx/yyy
[info] Caused by: org.scalasteward.core.util.UnexpectedResponse: uri: https://api.github.com/repos/xxx/yyy/pulls
[info] method: POST
[info] status: 403 Forbidden
...

This wraps `UnexpectedResponse`s on PR creation in the newly added
`RepositoryArchived` exception if the repository has been archived.
This makes it easier to extract the archived repositories from the
logs.

Here is an example from the log output:
```
[info] 2022-02-06 13:29:41,768 ERROR Steward xxx/yyy failed
[info] org.scalasteward.core.vcs.github.GitHubException$RepositoryArchived: xxx/yyy
[info] Caused by: org.scalasteward.core.util.UnexpectedResponse: uri: https://api.github.com/repos/xxx/yyy/pulls
[info] method: POST
[info] status: 403 Forbidden
...
```
@fthomas fthomas added the enhancement New feature or request label Feb 6, 2022
@fthomas fthomas added this to the 0.15.0 milestone Feb 6, 2022
@codecov
Copy link

codecov bot commented Feb 6, 2022

Codecov Report

Merging #2507 (4af672d) into main (212a749) will decrease coverage by 0.16%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2507      +/-   ##
==========================================
- Coverage   81.16%   81.00%   -0.17%     
==========================================
  Files         142      143       +1     
  Lines        2511     2516       +5     
  Branches       50       49       -1     
==========================================
  Hits         2038     2038              
- Misses        473      478       +5     
Impacted Files Coverage Δ
...rg/scalasteward/core/vcs/github/GitHubApiAlg.scala 75.00% <0.00%> (-6.82%) ⬇️
...scalasteward/core/vcs/github/GitHubException.scala 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 212a749...4af672d. Read the comment docs.

@fthomas fthomas merged commit e43c6d8 into main Feb 6, 2022
@fthomas fthomas deleted the topic/repository-archived branch February 6, 2022 18:44
@fthomas fthomas mentioned this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant