Secrets in PR: environment and repo

For what are environments are exist? In PR I can’t use secrets from the environment of repository but can use from repo’s secrets.