Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential workaround to make the workflow work with forks #19

Open
efb4f5ff-1298-471a-8973-3d47447115dc opened this issue Aug 3, 2022 · 3 comments
Labels
bug Something isn't working estimate: long An issue that takes a bit more work than usual

Comments

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link

efb4f5ff-1298-471a-8973-3d47447115dc commented Aug 3, 2022

Full disclaimer: I dont know if this is the way to go. Just because it worked for my workflow doesnt mean it should work with this one. Maybe it isnt even related but i thought i put it in here anyway.

@Levi-Lesches thankyou so much

i have a question about the use of the workflow. Are the following usecases valid for this workflow?

1. PR1 is dependent on PR2 (PR2 has to be merged/closed first in order to get PR1 merged). This one is pretty straight forward.

2. PR1 is dependent on issue1 (issue1 has to be closed first in order to get PR1 merged). This can be helpful when someone already created PR1 but u want issue1 to get addressed first but nobody has created a PR for it yet.

3. issue1 is dependent on PR1 (PR1 has to be merged/closed first in order to close issue1). This can be helpful when somebody forgets to link PR1 as dependency when they create PR2 for issue1

4. issue1 is dependent on issue2 (issue2 has to be closed first in order to close issue1). This can be helpful when there are no PR's yet that addresses one of the issues.

At the moment i can get your workflow to trigger when i create a PR in the main repo from a fork but the test result is exacly the same as #4 (comment) > Levi-Lesches/blocking-issues-test#40.

Edit: See #19 (comment)

@Levi-Lesches
Copy link
Owner

Interesting, the logs from closing Levi-Lesches/blocking-issues-test#39 say:

Getting current issue...
Issue is closed. Unblocking other issues...
Unblocking issues blocked by #39...
Initializing labels...
Updating 40
      Re-running most recent action on testpr

Oh... I see why this is failing. To signal to GitHub that the PR is ready to be merged, it needs to re-run the check that failed and let it succeed. When an issue/PR is closed, it goes through all issues/PRs that were blocked by it and, if it's a PR, re-runs the failed action.

The problem here is how it finds the action. Currently, the code searches for all checks that have run on a given branch, with the logic being that one of them has to be blocking-issues. However, the branch in question (testpr) has no workflows because it's a fork with actions disabled.

So I need to rework the logic around re-running failed checks. Maybe we don't even need to re-run it and can just start a new check.

@Levi-Lesches Levi-Lesches added bug Something isn't working estimate: long An issue that takes a bit more work than usual labels Aug 5, 2022
@efb4f5ff-1298-471a-8973-3d47447115dc

This workflow does workflow work for me now without any weird workaround https://github.com/eps1lon/actions-label-merge-conflict maybe u can take a look at it

@efb4f5ff-1298-471a-8973-3d47447115dc

Update: @Levi-Lesches I found a similar workflow to this that does work from fork maybe u can look into that https://github.com/gregsdennis/dependencies-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working estimate: long An issue that takes a bit more work than usual
Projects
None yet
Development

No branches or pull requests

2 participants