CircleCI token documentation (#2379)

This commit is contained in:
Haythem Tlili
2018-11-21 17:42:26 +01:00
committed by Paul Melnikow
parent ce0b492029
commit f076b46da8

View File

@@ -9,6 +9,16 @@ const circleSchema = Joi.array()
.max(1)
.required()
const documentation = `
<p>
Please note that <code>status</code> tokens will not work. Instead, you should generate an <code>all</code> scoped token.
<br />
For the sake of security, please use <b>Project Tokens</b> and never <b>Personal Tokens</b> as they grant full read write permissions to your projects.
<br />
For more information about managing Circle CI tokens, please read this <a target="_blank" href="https://circleci.com/docs/2.0/managing-api-tokens">article</a>.
</p>
`
module.exports = class CircleCi extends BaseJsonService {
async fetch({ token, vcsType, userRepo, branch }) {
let url = `https://circleci.com/api/v1.1/project/${vcsType}/${userRepo}`
@@ -87,6 +97,7 @@ module.exports = class CircleCi extends BaseJsonService {
exampleUrl:
'token/b90b5c49e59a4c67ba3a92f7992587ac7a0408c2/project/github/RedSparr0w/node-csgo-parser/master',
staticExample: this.render({ status: 'success' }),
documentation,
},
]
}