Loading validate-gitlab-yaml.py +6 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,12 @@ def main(): headers = { "Content-Type": "application/json", } # XXX: this doesn't actually work. The CI_JOB_TOKEN variable # *does* exist, but it doesn't have the privileges necessary to # run the API. This is just too bad, and should probably be # reported upstream so that we don't have to go through the hoops # of creating the project-level access token once a year. see: # https://docs.gitlab.com/ee/api/rest/#job-tokens ci_job_token = os.environ.get("CI_JOB_TOKEN") if ci_job_token: headers['JOB-TOKEN'] = ci_job_token Loading Loading
validate-gitlab-yaml.py +6 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,12 @@ def main(): headers = { "Content-Type": "application/json", } # XXX: this doesn't actually work. The CI_JOB_TOKEN variable # *does* exist, but it doesn't have the privileges necessary to # run the API. This is just too bad, and should probably be # reported upstream so that we don't have to go through the hoops # of creating the project-level access token once a year. see: # https://docs.gitlab.com/ee/api/rest/#job-tokens ci_job_token = os.environ.get("CI_JOB_TOKEN") if ci_job_token: headers['JOB-TOKEN'] = ci_job_token Loading