container-builder-github-ci-status icon indicating copy to clipboard operation
container-builder-github-ci-status copied to clipboard

Option for repo name as GH name

Open max-sixty opened this issue 6 years ago • 2 comments

Would it be helpful to have an option here that the repo is named the same in GH as GSR? It could check this format if it can't find the existing template.

TBC, the current code doesn't offer that an option (it's only the way we need it for our work), but happy to add that if helpful

max-sixty avatar Mar 29 '18 01:03 max-sixty

A good way to address this problem would be to parse the remote URL instead repoName. It would be ideal if this was provided in the build object under repoSource, but it's not.

I believe we could resolve the remote URL using the Cloud Source Repository API.

Could you tell me more about how you're setting up your mirrors? I'm using the GitHub Google Cloud OAuth App to mirror repos through the UI when creating build triggers.

When you do gcloud source repos list --format json do you have a mirrorConfig?

❯ gcloud source repos list --format json
[
  {
    "mirrorConfig": {
      "deployKeyId": "27991111",
      "url": "ssh://[email protected]/org/api.git",
      "webhookId": "24890000"
    },
    "name": "projects/gke-project/repos/github-org-api",
    "url": "https://source.developers.google.com/p/gke-project/r/github-org-api"
  }
]

stealthybox avatar Mar 29 '18 08:03 stealthybox

We have the same name in GSR as GH.

Here's one of the mirror configs:

    "mirrorConfig": {
      "deployKeyId": "#",
      "url": "ssh://[email protected]/SixtyCapital/sixty.git",
      "webhookId": "#"
    },
    "name": "projects/sixty-capital/repos/sixty",
    "url": "https://source.developers.google.com/p/sixty-capital/r/sixty"
  }

max-sixty avatar Mar 29 '18 16:03 max-sixty