Comments (2)
@frantic1048 ā Iām not sure DangerJS can fix this right? Since the upstream issue is 4 years old?ā¦
What would you like to do here?
from danger-js.
@fbartho Here are 2 ways I found to workaround it, but both of them have their own drawbacks. I'm currently using the second workaround to perform checks around parent_ids
.
-
Use GitLab Commits API
Retrieve
parent_ids
viaGET /projects/:id/repository/commits/:sha
, since this API is not suffering from the same issue. However, using this API may lead to lots of API calls when there are many commits in the merge request.e.g. https://gitlab.com/api/v4/projects/53011396/repository/commits/f1c6ae6e
-
Use git CLI
Use
git show -s --pretty=format:%p <commit>
to retrieveparent_ids
. This more efficient than the first workaround, but it requires a local git repository.To ensure essential git history is available, we may need to run
git fetch $CI_COMMIT_REF_NAME
first.
Because of the drawbacks, I'm not promoting any of the workarounds into danger-js. Just sharing my findings here in case anyone else is facing the same issue.
For danger-js, I think it's better to add some warning messages(through comments on the type definition) about parent_ids
field in the merge request payload, so that users can be aware of the issue.
from danger-js.
Related Issues (20)
- [DEPS] Move from @gitbeaker/node to @gitbeaker/rest HOT 3
- [BUG] Danger taking comments as modified files HOT 6
- [BUG] process.env - Cannot read properties of undefined (reading 'env') HOT 1
- [BUG] substr is deprecated HOT 2
- [BUG] Danger.js comments removed from Github PR after merge HOT 5
- [BUG] [Gitlab] Can't post multiple inline comments HOT 1
- [BUG] Upgrading to danger `11.3.0` causes `tsc` build errors HOT 4
- [BUG] Include dangerfile.ts in the tsconfig makes tsc run out of memory HOT 2
- [BUG][Spec] GitHubReviewers interface is not described
- [BUG] Danger fails to create inline comments on Gitlab
- [BUG] Danger posting separate comment for each warning on GitHub HOT 2
- GHCR publishing is broken HOT 3
- [BUG] GitHubAPIPR unsupported structure HOT 2
- [BUG] `message` does not attach to a file and line provided, and instead all comments are in the "main comment" section HOT 1
- [Feature Request] Support ignoring whitespace-only changes HOT 3
- [BUG] prettier.resolveConfig fails due to faulty shouldUseGitHubOverride HOT 8
- [BUG] Can you push updated images to dockerhub? HOT 4
- [BUG] Commit status check associated with the wrong commit in CircleCI + GitHub combination HOT 2
- [Config Issue] GitHub Merge Queue - Danger server stuck in "waiting for status be reported" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from danger-js.