How to handle dependencies across repos when running integration tests?

We’re an Angular app backed by a Rails API. The Angular code and Rails code
live in separate repos. When we build new features we use feature branches,
so we might have e.g.

angular/foobar

depending on

rails/foobar

When our CI server runs integration tests, it needs to know that the angular/foobar branch needs to run against the rails/foobar branch. How do people solve the branch dependency issue across repos when running integration or end to end tests? It doesn’t seem to be a well-solved issue so curious to hear how others approach this.

Thanks!