#159 Expose target repository via environment variables
Closed by mvadkert. Opened by mvadkert.

After migration to Testing Farm, some of the use cases which worked before broke. One of the things that changed is that with a PR workflow on tests, when the PR is opened from a fork, the pipeline previously applied a patch on top of the target repository / branch. With testing farm the service checkouts the fork commit instead.

This broke a use case tests/selinux repository was using to find the log diff of the PR, see this issue for details:
https://pagure.io/fedora-ci/general/issue/158

The playbook they use to gather test from the PR:
https://src.fedoraproject.org/tests/selinux/blob/master/f/tests-pr.yml#_6

To properly maintain such a functionality, we are proposing to provide the PR target repository and branch as environment variable, something like:

FEDORA_CI_PULL_REQUEST_TARGET_REPOSITORY
FEDORA_CI_PULL_REQUEST_TARGET_BRANCH


Metadata Update from @msrb:
- Issue tagged with: STI-compat

@omos is this still something we need or are you fine with your solution?

I'd say it's not necessary now. Hopefully we'll be able to migrate to TMT before the repo/branch changes again, so it wouldn't be worth implementing this for STI.

\o/ Closing

Metadata Update from @mvadkert:
- Issue status updated to: Closed (was: Open)

Metadata