-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Annotations in GitLab (pull request proposal) #1990
Comments
@jord1e let's do it :) |
Will get started in the next few weeks. It may take some time. |
@kamilkisiela would it be okay to add an --format option to the diff command?
You'd then redirect the output to a file (using a file pipe I would add a I really don't have the time to recreate the entire GitHub integration (it isn't even possible to do it simply in GitLab). It would look like this in .gitlab-ci.yml: graphql-inspector:
image: <inspector image>
stage: test
script:
- git fetch origin main
- mkdir -p reports
- graphql-inspector diff git:origin/main:mygraph.graphql mygraph.graphql --format gitlab > reports/graphql-inspector.json
artifacts:
name: '$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG'
expire_in: 1 day
when: always
reports:
codequality:
- 'reports/*'
paths:
- 'reports/*'
allow_failure:
exit_codes:
- 1 The Hadolint project uses the same method, and it works perfectly: Docs will of course be updated to reflect these changes. The default output format would be |
@jord1e sounds good! |
Is it ok if i move |
@jord1e yes :) |
@kamilkisiela I got this far: Inline hints also seem to be working for free GitLab accounts! Which is also great! There are a few bugs left (like the TODO:
Could you please enable workflows in #2024 ? Last note: I expect to be done early next week. |
@jord1e Done :) |
I can't figure this out: I need a Source object here: The Source class is this:
The body needs to be the SDL of the schema. The problem is I don't know how to get it there. In the tests 'in-memory schemas' are used (https://github.com/kamilkisiela/graphql-inspector/pull/2024/files#diff-1b58322e0811e8317e77102c70ab98b1ad9871fa9d02d3d92ce8d0b4e64607f6R4) But the document loading mechanics in the command handler are complicated and seem to use three (?) different The Guild packages. So reading the file contents with readFileSync doesn't work. |
Still stuck on that point |
hey @jord1e |
I no longer plan on contributing. You are allowed to fork the fork and keep working with what I already did. |
Is your feature request related to a problem? Please describe.
Display annotations in GitLab in addition to standard CI output.
Describe the solution you'd like
Since GitLab version 13.2 (July 2020) Code Quality reports have been made available in the free tier.
The reports are based on the Code Climate issue spec as described in the Implementing a custom tool section.
I would like an option in the
graphql-inspector diff
command to generate code climate JSON reports.I propose the following mapping of severity levels:
Ref: GitHub severity mappings
Icons can be seen on the Vulnerability Report page.
Example in pull requests:
And in the diff view (only for GitLab ultimate, urghhh):
The JSON for each change will look like the following:
Sample:
The option would be
--codeclimate "path/filenameString.json"
and it would output valid Code Climate JSON to said path.I would like to contribute this feature via a pull request, but only if the feature gets merged.
Describe alternatives you've considered
Not applicable.
Additional context
Issue #54 and #361
Pinging @kamilkisiela as the only maintainer
The text was updated successfully, but these errors were encountered: