How do i target a specific pull request for a deploy?

I wonder if there is a way to target a unique pull request?

hi @regisphilibert - maybe this is helpful:

Hi @regisphilibert, can you clarify what you mean by “target a unique pull request”? Thank!

Thanks @perry, I was not able to find what I was looking for (maybe I’m missing something), but it’s definitely informative!

Hi @futuregerald,

this message was part of another thread and is here losing some important context :slight_smile:

I was talking about environment configuration from netlify.toml

Let’s say we create PR for a specific feature that requires a dedicated build command. I’ll have a deploy preview for this request, but no way (to my knowledge) to target it from netlify.toml in order to assign that dedicated build command or environment variable.
I can only target all deploy previews.

Hi Regis,

Thanks for the clarification! You’re right, there isn’t a way for a context to target a specific deploy preview. The typical workflow around this is to scope the command to a branch and do the testing in the branch, but I can definitely see the hole in that workflow.

The workaround that I typically suggest or use in cases like this is write a custom script that checks the environment and adjusts accordingly. I know that’s not ideal, but it does work.