Skip to content

Improved Github support.#122

Merged
lazno merged 5 commits intofirstbirdtech:masterfrom
cptwunderlich:improve-github-support
Aug 10, 2023
Merged

Improved Github support.#122
lazno merged 5 commits intofirstbirdtech:masterfrom
cptwunderlich:improve-github-support

Conversation

@cptwunderlich
Copy link
Contributor

Filtering out 'draft' PRs.
Checking PR's 'mergeable' flag as merge-check.

Filtering out 'draft' PRs.
Checking PR's 'mergeable' flag as merge-check.
@cptwunderlich
Copy link
Contributor Author

I'm filtering out 'draft' PRs to begin with, bc. neither can nor do we want to merge them (unfortunately, the API doesn't allow us to filter them with the request).

The second thing is about the merge check.
As the docs state, Github will perform a merge-check in the background (and that can go stale). So we request the PR item resource, which triggers a merge-check (if none or stale). While that is running, the value of "mergeable" is NULL.
My retry mechanism is still a bit sketchy. We'd actually have to repeat the request (with a little waiting time) until we get a Non-Null result.

@cptwunderlich cptwunderlich marked this pull request as draft August 10, 2023 07:23
@cptwunderlich cptwunderlich marked this pull request as ready for review August 10, 2023 09:34
@cptwunderlich
Copy link
Contributor Author

I improved the retry mechanism. So far, delay time and retries are hard-coded though.

@lazno lazno merged commit 3ec8554 into firstbirdtech:master Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants