Open glensc opened 1 year ago
The CI error is not from changes of this PR:
error workbox-webpack-plugin@6.6.1: The engine "node" is incompatible with this module. Expected version ">=16.0.0". Got "14.21.3"
error Found incompatible module.
actually, I ran such code in my danger plugin:
await gitlab.api.MergeRequests.edit(mr.project_id, mr.iid, { assigneeId: mr.author.id })
and I'm getting 403, what's with that?
Error: HTTPError: Response code 403 (Forbidden)
at Request.<anonymous> (/app/node_modules/got/dist/source/as-promise/index.js:118:42)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
EDIT: I think my token has no write accesss
I don't think we should do this, as this fn is just an alias to this.api.MergeRequests.edit(this.repoSlug, this.prId, changes)
- the other functions we expose in utils do some work under the hood - this just passes params and I think folks should be using the API instance directly for that sort of work to keep our API surface down
The wrapped methods add debug calls. it would be useful to see debug logs when troubleshooting.
But this all started because incompatible api change:
I'd imagine there would be similar debugging env vars on the gitlab API instance too -
yeah, gitlab.api
should be the npm module! happy to switch that back over
Similarly to https://github.com/danger/danger-js/pull/1353, expose
updateMergeRequestInfo
method to be able to edit merge requests from danger code.