Seneca Gitlab-Provider is a plugin for Seneca
Provides access to the Gitlab API using the Seneca provider convention. Gitlab API entities are represented as Seneca entities so that they can be accessed using the Seneca entity API and messages.
This open source module is sponsored and supported by Voxgig. |
---|
// Setup - get the key value (<ACCESS_TOKEN>) separately from a vault or
// environment variable.
Seneca()
.use('provider', {
provider: {
gitlab: {
keys: {
api: {
value: '<ACCESS_TOKEN>'
},
}
}
}
})
.use('gitlab-provider')
let project = await seneca.entity('provider/gitlab/project')
.load$({id: <PROJECt_ID>})
console.log('PROJECT DATA', project)
project.description = 'New description'
project = await project.save$()
console.log('UPDATED DATA', project)
$ npm install @seneca/gitlab-provider
None.
- "role":"entity","base":"gitlab","cmd":"load","name":"project","zone":"provider"
- "role":"entity","base":"gitlab","cmd":"save","name":"project","zone":"provider"
- "sys":"provider","get":"info","provider":"gitlab"
Load the Gitlab project data into an entity, through a project id informed as a parameter.
Update Gitlab project data from an entity, through a project id, informed as a parameter.
Get information about the provider.