feat: add mergeability checks to summary view#532
feat: add mergeability checks to summary view#532jakubbortlik wants to merge 2 commits intoharrisoncramer:developfrom
Conversation
| u.merge(info, { refresh = true }), | ||
| u.merge(mergeability, { refresh = true }), |
There was a problem hiding this comment.
I guess it could be more efficient to fetch all the data in one GraphQL request, or only request the mergeability checks if the user includes them in the settings.info.fields.
Ultimately, I'd also like to add to the summary the approvals (#444), which would also be possible with the GraphQL API. Then it would make even more sense to do only one request for the data, or perhaps dynamically create the GraphQL query by only requesting those fields that the user configures.
|
|
||
| M.color_details = function(bufnr) | ||
| local details_namespace = vim.api.nvim_create_namespace("Details") | ||
| for i, v in ipairs(state.settings.info.fields) do |
There was a problem hiding this comment.
By introducing the multiline mergeability checks, this iteration over the fields and line indexing would stop working if the mergeability checks were not the last item in the fields table.
I guess, I should fix this in this PR.
Closes #508.
This PR uses Gitlab's GraphQL API to retrieve the mergeability checks from the server and shows them in the Summary view:

Users can configure it to: