Adds workflow to update the status of a PR #1599
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a GH workflow to automatically update the review status of a PR within a GH project. It is assumed that a PR is only part of either 0 or 1 projects.
The status will be set from the following criteria:
>=1
changes-requested ->in-progress
>=2
approved ->ready-to-merge
>=1
reviews pending ->in-review
Compared to our current GH actions, this uses the graphQL api instead of the rest API. The new projects are not available with rest API so the graphQL API has to be used.
You can see an example of that in a PR in my repo MarcelKoch/gh-projects-playground#1 (maybe ignore the comments in there...) and the project https://github.com/users/MarcelKoch/projects/5. I think you can just add a review there, or add your self as reviewers, and then the project will be automatically updated.
Other than that, I'm not sure if this can be tested, due to our CI setup.
Todo: