PR Env Name?
tallestbassist
TRIALOP

a year ago

Hello!

I set up my PR environment with github actions. And the PR environment naming changes between 2 formats. As you can see from the pictures sometimes it uses the Github repo name and sometimes just some numbers. Is there a reason for that or can i make it somehow that it always uses the repo name?

11 Replies

tallestbassist
TRIALOP

a year ago

N/A


a year ago

the naming convention is not user configurable unfortunately, is there a reason it strictly matters if I may ask?


tallestbassist
TRIALOP

a year ago

I have 3 services on there that i need to read info from and write to them to change Service Variables. I use JS to send GraphQL queries and i find the service and Enviornment ID's based on their names.
Since is a PR Enviornment the ID's are always new.
Currently if the name is set to "gitub-name"-pr-"number of pullrequest" i can just look at all the enviornments i have, and get the ID based on that name


tallestbassist
TRIALOP

a year ago

but sometimes for some reason it just puts Pr-"some nr" - " pr-nr"


tallestbassist
TRIALOP

a year ago

but not always


tallestbassist
TRIALOP

a year ago

But i quess i can just regex the end and just look for the number. was just wondering if there was some reason for it changeing like that.


a year ago

I'm honestly not sure, but I don't think you should be replying on the pr environment name regardless, imo that seems hacky


tallestbassist
TRIALOP

a year ago

If i have multiple PR enviorments open how would i find automatically the correct ones ID then?


a year ago

get the most recently created environment's id


tallestbassist
TRIALOP

a year ago

Alright. Well thanks for the info.


a year ago

no problem!


Loading...