Skip to content

Commit

Permalink
mhutchie#462 Updated GitLab Authorization of CI/DI Status
Browse files Browse the repository at this point in the history
  • Loading branch information
keydepth committed Mar 7, 2021
1 parent 687c8e8 commit 9c78b77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1535,14 +1535,17 @@ export class DataSource extends Disposable {
const apiRoot = `${hostRootUrl}`;
const cidiRootPath = `/repos/${sourceOwner}/${sourceRepo.replace(/\//g, '%2F')}/actions/runs?per_page=100`;

const config: request.RequestPromiseOptions = {
let config: request.RequestPromiseOptions = {
method: 'GET',
headers: {
'Authorization': `token ${cidiConfig.glToken}`,
'Accept': 'application/vnd.github.v3+json',
'User-Agent': 'vscode-git-graph'
}
};
if (cidiConfig.glToken === '' && config.headers) {
delete config.headers['Authorization'];
}

config.transform = (body, response) => {
try {
Expand Down

0 comments on commit 9c78b77

Please sign in to comment.