Skip to content

feat: gh run rerun|cancel #1000

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

Merged
merged 10 commits into from
Mar 31, 2025
Merged

Conversation

GustavEikaas
Copy link
Contributor

@GustavEikaas GustavEikaas commented Mar 22, 2025

Issue: #449

  • Update readme

Details buffer

  • Rerun
  • Rerun only failed jobs
  • Cancel

Telescope

  • Rerun
  • Rerun only failed jobs
  • Cancel

Keybindings Update

Added the following keybindings to buffer and telescope:

  • <C-o> → Rerun workflow
  • <C-f> → Rerun failed workflow
  • <C-x> → Cancel workflow

@williambdean williambdean added the enhancement New feature or request label Mar 22, 2025
@williambdean
Copy link
Collaborator

Thanks for the PR! Looks awesome! 🎉

How easy is it to make a Octo run rerun command? Do the pickers support callbacks on the selected item? Thinking something similar to Octo issue list and Octo issue develop

@GustavEikaas
Copy link
Contributor Author

GustavEikaas commented Mar 22, 2025

You mean Octo run rerun like in?

  1. :Octo run rerun
  2. Telescope picker listing all wf runs
  3. Press enter to trigger a rerun
  4. Go to details buffer of wf run

@williambdean
Copy link
Collaborator

Yeah, exactly. Would that be useful as well?

@GustavEikaas
Copy link
Contributor Author

GustavEikaas commented Mar 23, 2025

I'm not convinced tbh, I'm struggling to see the use-case.

The way I see it, the user flow would be something like this

  1. User triggers a workflow
  2. User notices the workflow has failed
  3. User modifies and external system before rerunning the workflow (or the workflow is flaky af)
  4. User triggers a rerun of the workflow

So to me I dont really understand how the user would know that the workflow failed. There are multiple cases I guess

  1. :Octo run list reveals that the workflow failed -> use telescope binding to rerun?
  2. The octo workflow run buffer reveals that the workflow failed -> use buffer binding to rerun
  3. Github UI shows a failed workflow -> easily retrigger from github ui

I dont mind implementing it, just personally I dont see what the user flow is

EDIT

I guess there are other motivations for rerunning a workflow rather than failed workflow. e.g workflow_dispatch etc
But I would still want to see the details of old run before rerunning

@GustavEikaas
Copy link
Contributor Author

Okay so basically, I have added keybindings for rerun | cancel in both telescope and buffer. I could need some good suggestions on which sensible keybindings to use

@williambdean
Copy link
Collaborator

williambdean commented Mar 23, 2025

Maybe <C-x> for cancel?

@GustavEikaas GustavEikaas marked this pull request as ready for review March 24, 2025 17:36
@GustavEikaas
Copy link
Contributor Author

GustavEikaas commented Mar 24, 2025

@williambdean What do you think about merging this PR, which adds cancel | rerun | rerun failed to telescope and octo wf buffer.

If we want Octo run cancel and Octo run rerun it could be a separate pr?

How easy is it to make a Octo run rerun command? Do the pickers support callbacks on the selected item? Thinking something similar to Octo issue list and Octo issue develop

Not that hard to add but I think it merits some discussion about how the signature/syntax should be

@williambdean
Copy link
Collaborator

williambdean commented Mar 26, 2025

Yeah, let's wait on that then!

Did you want to update the README still?

@GustavEikaas
Copy link
Contributor Author

Readme updated✅
Some tests are failing but it seems unrelated to my changes?

@williambdean
Copy link
Collaborator

Yeah, they seem unrelated. Let me take a look at the changes

@GustavEikaas
Copy link
Contributor Author

@williambdean It's good to go I think

@williambdean
Copy link
Collaborator

Great. Taking a look

Copy link
Collaborator

@williambdean williambdean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great. Thanks!

@williambdean williambdean merged commit eb969bf into pwntester:master Mar 31, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants