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

Use push events to poll for new job runs #9

Open
simmel opened this issue May 9, 2023 · 3 comments
Open

Use push events to poll for new job runs #9

simmel opened this issue May 9, 2023 · 3 comments

Comments

@simmel
Copy link

simmel commented May 9, 2023

Awesome tool!

I wanted to yak shave something similar but I just wanted to run in another terminal to see that my CI/CD got a green bar, not start a process after every time I've pushed and Github Actions has started the job (which can take some time sometimes).

My idea was:
Poll https://docs.github.com/en/rest/reference/activity#list-repository-events and look for push events. I know it says This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. but that's just a warning, I suspect it's pretty much always fast except if Githubs "bus" is very backlogged.

My additional idea was to list workflow and then from the workflow runs display the job logs but it turns out you can't stream them; the logs are only available when the job is done.

Yay or nay?

@nedbat
Copy link
Owner

nedbat commented Sep 7, 2023

Hi, sorry I haven't commented on this yet. I don't understand how you would use watchgha after this change. It would repeatedly poll the repo events, and when it saw a push event, it would start showing those actions?

@simmel
Copy link
Author

simmel commented Sep 8, 2023

Exactly. So think tail -F but for a repos actions. So watchgha -F simmel/somerepo and everytime I commit and a build action starts watchgha starts so show the status.

@simmel
Copy link
Author

simmel commented Sep 8, 2023

An extension later on when an action run (what is the real term?) is complete and "green" you should "minimize" the run to one line with a green check. So just how the topmost line in the gif in the README and add a green check after.

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

No branches or pull requests

2 participants