Skip to content

Conversation

@tomasmatus
Copy link
Member

@tomasmatus
Copy link
Member Author

hmm right, I didn't realize that the runners won't run the code from here lol

@tomasmatus tomasmatus force-pushed the automerge-bots branch 2 times, most recently from caf32dc to 04f128a Compare June 5, 2025 11:03
@tomasmatus
Copy link
Member Author

tomasmatus commented Jun 5, 2025

The way I think this could work (just dropping my ideas here to not forget):

run-queue starts a job as usual. If this job runs against a Pull Request then check who is the author of this PR.
If the author is our cockpituous bot or the github-ci bot then this PR is a candidate for automerge if all checks are green.

Since this would run at the end of run-queue then the current running job should already be ACKed and marked as pass/fail on github so the following API request to check status of checks should be up to date.

To figure out which checks should pass maybe this could connect to the testmap and validate that all required checks actually ran and none are missing.

--
Now i need to see if I can run this locally to some extent

run-queue uses different structure than job-runner, this fixes the code
import pika

from lib.aio.base import SubjectSpecification
from lib.aio.jsonutil import JsonObject, get_int, get_str

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'JsonObject' is not used.
Import of 'get_int' is not used.
Import of 'get_str' is not used.
Comment on lines +69 to +71
# if not is_ci_bot(api, pr):
# logger.info("PR not made by CI bot, skipping automerge")
# return

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
@tomasmatus tomasmatus force-pushed the automerge-bots branch 7 times, most recently from fbf4be8 to 04d0b03 Compare July 2, 2025 09:31
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.

1 participant