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

Support branch event #67

Open
TastyPi opened this issue Jun 23, 2023 · 2 comments
Open

Support branch event #67

TastyPi opened this issue Jun 23, 2023 · 2 comments

Comments

@TastyPi
Copy link

TastyPi commented Jun 23, 2023

I'd like to be able to fire notifications when a TODO is merged into a specific branch. This is useful for things where you have to wait for something to be running in production before you can make more changes (e.g. backfills).

The way I think this could work is to have a branch: 'production' option, and all that would do is check "does the currently checked-out branch match the given branch name?". It could potentially support RegExp as well for more advanced matching.

Since this requires running smart_todo across multiple branches, it would also be nice to support an --events flag to filter which events actually get checked. So in this case, I would run smart_todo normally in our main branch, and then smart_todo --events branch in the production branch when a new release is pushed.

So this is kind of two features in one. I'd like to know:

  1. Is this repo open to contributions for events that Shopify might not use?
  2. Do these features sound reasonable to add?
@rafaelfranca
Copy link
Member

  1. Is this repo open to contributions for events that Shopify might not use?

Yes

2. Do these features sound reasonable to add?

I'm not sure. The branch smart_todo runs should not influence the result of it. We For example run the tool on very branch and we expect the same result with the only difference being the new code existing in that branch.

But at the same time I don't think I understood the use case. If all you want is to notify people about TODOs that are in the production branch why not run smart_todo only on that branch?

In the first glance, supporting this means that smart_todo would need to know about git.

Maybe a better feature would be to allow smart todo to load plugins? In that case you could write this plugin and use in your application.

I'm ok with the a feature to filter events though.

@TastyPi
Copy link
Author

TastyPi commented Jun 28, 2023

But at the same time I don't think I understood the use case. If all you want is to notify people about TODOs that are in the production branch why not run smart_todo only on that branch?

I would want to run it both on main for the on: events, and in the production branch for the branch: 'production' events. But I don't want to duplicate notifications for the on: events when running twice.

In the first glance, supporting this means that smart_todo would need to know about git.

Depends how it's implemented, an alternative to a branch option could be a tag, and you add --tags production to the CLI?

Maybe a better feature would be to allow smart todo to load plugins? In that case you could write this plugin and use in your application.

That would be cool, I imagine other companies have events specific to them that they would want to implement.

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