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

Experiment: Interactive mode: generate + commit + lint + commit #214

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gpetiot
Copy link
Member

@gpetiot gpetiot commented Apr 12, 2024

Fix #213

It's an interactive mode integrated to okra generate instead of a separate command, but I have mixed feelings about calling lint from generate.

Also cc @shindere, I'm curious to know if this kind of workflow is easier with regard to accessibility, or if its counter-productive.

Copy link
Contributor

@MisterDA MisterDA left a comment

Choose a reason for hiding this comment

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

Thanks a lot for experimenting this out so quickly! I'll try it out.

I have mixed feelings about calling lint from generate.

I understand you'd rather keep these separate, but I don't think it's a good idea to automatically commit the report without linting it.

I'm curious to know if this kind of workflow is easier with regard to accessibility, or if its counter-productive.

I'm not directly affected by lack of accessibility, but I'd be fine with this new behavior being opt-in.

bin/generate.ml Outdated Show resolved Hide resolved
bin/generate.ml Outdated Show resolved Hide resolved
v admin_dir / "weekly" / Fmt.str "%4d" year / Fmt.str "%02i" week / user
|> add_ext "md")
in
let* () = Bos.OS.File.delete file in
Copy link
Contributor

Choose a reason for hiding this comment

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

okra could abort or warn if the file already exists, or even append new text, instead of silently deleting the file.

bin/generate.ml Outdated Show resolved Hide resolved
Co-authored-by: Antonin Décimo <antonin.decimo@gmail.com>
@gpetiot
Copy link
Member Author

gpetiot commented Apr 22, 2024

Alternative workflow I would like to explore: (suggested by @cuihtlauac)
okra gen -> git add, commit & push -> open the PR on tarides/admin in the browser (like dune-release) -> the lint is taken care of by the CI (can only push if that lint is OK)

@cuihtlauac
Copy link
Member

Alternative workflow I would like to explore: (suggested by @cuihtlauac) okra gen -> git add, commit & push -> open the PR on tarides/admin in the browser (like dune-release) -> the lint is taken care of by the CI (can only push if that lint is OK)

In my view, the GitHub action generates my weekly PR; I'm to review and amend it with whatever is missing or wrong.

@MisterDA
Copy link
Contributor

What is the advantage of linting in the CI, especially if there's some back-and-forth to do to edit/fix the weekly, if the dish can be prepared for serving before its send?

@gpetiot
Copy link
Member Author

gpetiot commented Apr 22, 2024

This would be an alternative for people who don't want to use the cli (so that people still benefit from the auto-generated okra-gen weeklies without the cli)

@cuihtlauac
Copy link
Member

To me, the big advantage is I don't need to organize myself. Whatever I do or forget to do, the PR lands in my mailbox. And if I'm late, several stacks up. That's lazy-friendly :-)

@shindere
Copy link
Contributor

shindere commented May 2, 2024 via email

@gpetiot
Copy link
Member Author

gpetiot commented May 17, 2024

In my view, the GitHub action generates my weekly PR; I'm to review and amend it with whatever is missing or wrong.

@cuihtlauac I have added a github action to experiment with that: https://github.com/tarides/admin/pull/57, it might require some minor tinkering (currently some issues with basic unix commands), but we are close to have this workflow working.

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.

All-in-one engineer workflow proposal
4 participants