Railways Public API
alipbudiman
HOBBYOP

10 months ago

Hello, how to set Branch connected to Github repository on Setting > Source if using Railways Public API?

9 Replies

alipbudiman
HOBBYOP

10 months ago

N/A


10 months ago

hey, the mutation you're looking for is serviceInstanceUpdate


alipbudiman
HOBBYOP

10 months ago

Which field?, i just see on source only image and repo


10 months ago

it's the repo field in the following format: {org or username}/{repoName}
example: vercel/next.js


alipbudiman
HOBBYOP

10 months ago

Yes, but that's not quite what I meant. I'm looking for a 'branch connect' using Railways Public API so that when I update my GitHub repository, the Railway service also gets updated automatically.


10 months ago

Oh you're looking for a way to connect a specific branch to a service


alipbudiman
HOBBYOP

10 months ago

Yes 😊


10 months ago

then you're looking for:

mutation {
  serviceConnect(
    id: "SERVICE_ID"
    input: {branch: "main", repo: "vercel/next.js"}
  ) {
    id
    createdAt
  }
}

alipbudiman
HOBBYOP

10 months ago

Thank you very much, you are very helpful 😊. I really appreciate it once.


Loading...