How to use the github.token function in github

To help you get started, we’ve selected a few github examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brigadecore / brigade / brigade-worker / src / k8s.ts View on Github external
p.secrets = JSON.parse(b64dec(secret.data.secrets));
  }
  if (secret.data.allowPrivilegedJobs) {
    p.allowPrivilegedJobs = b64dec(secret.data.allowPrivilegedJobs) == "true";
  }
  if (secret.data.allowHostMounts) {
    p.allowHostMounts = b64dec(secret.data.allowHostMounts) == "true";
  }
  if (secret.data.sshKey) {
    p.repo.sshKey = b64dec(secret.data.sshKey);
  }
  if (secret.data.sshCert) {
    p.repo.sshCert = b64dec(secret.data.sshCert);
  }
  if (secret.data["github.token"]) {
    p.repo.token = b64dec(secret.data["github.token"]);
  }
  if (secret.data["kubernetes.cacheStorageClass"]) {
    p.kubernetes.cacheStorageClass = b64dec(
      secret.data["kubernetes.cacheStorageClass"]
    );
  }
  if (secret.data["kubernetes.buildStorageClass"]) {
    p.kubernetes.buildStorageClass = b64dec(
      secret.data["kubernetes.buildStorageClass"]
    );
  }
  return p;
}
github brigadecore / brigade / brigade-worker / src / k8s.ts View on Github external
if (secret.data.secrets) {
    p.secrets = JSON.parse(b64dec(secret.data.secrets));
  }
  if (secret.data.allowPrivilegedJobs) {
    p.allowPrivilegedJobs = b64dec(secret.data.allowPrivilegedJobs) == "true";
  }
  if (secret.data.allowHostMounts) {
    p.allowHostMounts = b64dec(secret.data.allowHostMounts) == "true";
  }
  if (secret.data.sshKey) {
    p.repo.sshKey = b64dec(secret.data.sshKey);
  }
  if (secret.data.sshCert) {
    p.repo.sshCert = b64dec(secret.data.sshCert);
  }
  if (secret.data["github.token"]) {
    p.repo.token = b64dec(secret.data["github.token"]);
  }
  if (secret.data["kubernetes.cacheStorageClass"]) {
    p.kubernetes.cacheStorageClass = b64dec(
      secret.data["kubernetes.cacheStorageClass"]
    );
  }
  if (secret.data["kubernetes.buildStorageClass"]) {
    p.kubernetes.buildStorageClass = b64dec(
      secret.data["kubernetes.buildStorageClass"]
    );
  }
  return p;
}