R
Railway2w ago
Nick

Pull request environment variable

Is there a way to determine if the current environment is a pull request environment via environment variables? I have some testing tools that I'd like to enable in PR environments, but for security reasons I don't want them to accidentally turn on for other environments.
Solution:
you could check the value of RAILWAY_ENVIRONMENT_NAME ? https://docs.railway.app/reference/variables#railway-provided-variables...
Jump to solution
3 Replies
Solution
Brody
Brody2w ago
you could check the value of RAILWAY_ENVIRONMENT_NAME ? https://docs.railway.app/reference/variables#railway-provided-variables
Nick
NickOP2w ago
Hm, good idea. The PR environments should alway start with <repo name>-pr-<pr number> right?
Brody
Brody2w ago
yep!
Want results from more Discord servers?
Add your server