Railways Public API
alipbudiman
HOBBYOP

a year ago

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

9 Replies

alipbudiman
HOBBYOP

a year ago

N/A


a year ago

hey, the mutation you're looking for is serviceInstanceUpdate


alipbudiman
HOBBYOP

a year ago

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


a year ago

it's the repo field in the following format: {org or username}/{repoName}

example: vercel/next.js


alipbudiman
HOBBYOP

a year 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.


a year ago

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


alipbudiman
HOBBYOP

a year ago

Yes 😊


a year ago

then you're looking for:

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

alipbudiman
HOBBYOP

a year ago

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...