Skip to content
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

fix: gitlab api diffForFile #1320

Merged
merged 3 commits into from Oct 4, 2022
Merged

Conversation

ivankatliarchuk
Copy link
Contributor

@ivankatliarchuk ivankatliarchuk commented Oct 2, 2022

BUG

Impact

Gitlab functionality is broken. Construct await danger.git.diffForFile(file) throw an unhadled exception when file not found


found a regression.
with gitlab library

if ((e as any).response.status === 404) {
        return ""
      }

@gitbreaker library

if ((e as any).response.statusCode === 404) {
        return ""
      }

gitbreaker does handle errors in un-documented way

tested locally with local installation

yarn build && yarn pack

@ivankatliarchuk ivankatliarchuk changed the title fix: gitlab api drart fix: gitlab api Oct 2, 2022
@ivankatliarchuk ivankatliarchuk changed the title drart fix: gitlab api drart fix: gitlab api diffForFile Oct 2, 2022
@ivankatliarchuk ivankatliarchuk changed the title drart fix: gitlab api diffForFile fix: gitlab api diffForFile Oct 2, 2022
@ivankatliarchuk
Copy link
Contributor Author

Hi, @orta . Would it be possible to review this PR? The bug was introduced, probably some pipelines on Gitlab are failing if they automatically update danger version, ups...

@orta
Copy link
Member

orta commented Oct 4, 2022

No need to ping me after a day, no-one gets a SLA on open source I run in my spare time.

That said this looks good, not sure when I'll get around to being on my mac to deploy, but we can merge 👍🏻

@orta orta merged commit 9539b9d into danger:main Oct 4, 2022
@ivankatliarchuk ivankatliarchuk deleted the fix/getFileContents branch October 9, 2022 10:03
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.

None yet

2 participants