How to get upstream and downstream dependencies?

I’m currently working on a feature, which uses to automate PR request testing process. I need to get the downstream and upstream dependencies from PRs before entering to the testing phase. Is there any endpoint or work around(other than the parsing HTML content of a PR) to achieve my goal?

I am not quite sure I understand you correctly.
Do you effectively want to have a CI that automatically tests your PRs?
If that’s the case, the best course of action is probably to either set up a remote CI like Jenkins,
or to wait for Implement actions by wolfogre · Pull Request #21937 · go-gitea/gitea · GitHub to be merged.

Appreciate your quick response @delvh. Yes, I have set up a remote Jenkins instance to carry the CI. What I am asking is that following.

Let say we have two repositories in Gitea => repo_1 and repo_2

repo_1 is the upstream project and repo_2 is the downstream project.

Let say we have two PRs in these two repos respectively PR_1 in repo_1 and PR_2 in repo_2.

Then we add the PR_1 as a dependency to the PR_2. (It means that PR_2 depends on PR_1 and PR_1 blocks PR_2)

So, is there any way or a workaround to get these dependencies(with their direction) from a PR?

Ah, so you mean those dependencies, not the code-related dependencies.
I don’t think the API exposes them at the moment.
Please open an issue for it.

1 Like

@delvh thanks for the interest, I’ll open an issue.