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

Populate feature metadata in the pull request title and body #11

Open
micahjsmith opened this issue Jun 16, 2021 · 0 comments
Open

Populate feature metadata in the pull request title and body #11

micahjsmith opened this issue Jun 16, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@micahjsmith
Copy link
Contributor

micahjsmith commented Jun 16, 2021

Is it doable to have a new feature pull request contain the feature name and feature description automatically in the conversation dialog?

yes this would definitely be possible, the relevant method is here: https://github.com/ballet/ballet-assemble/blob/master/server/ballet_assemble/app.py#L229

considerations

  • the input to the pull request creation method is the code content, which is an arbitrary string
  • you could parse the code with static analysis to try to recover the feature attributes like the name, but not guaranteed to succeed, for example someone could submit a code cell which does not include a feature definition
  • if you use dynamic analysis, i.e. eval the code and try to import the feature, it could have side effects (and be a security vulnerability), though of course a user who did this would just be hurting their own development environment
  • after one of the above attempts, a fallback in case any errors occur could just be the existing PR message
  • can supplement this automatic detection with user confirmation
    • existing flow: select code cell(s) -> press submit -> confirm the code content is as desired -> feature is submitted
    • candidate flow: select code cell(s) -> press submit -> confirm the code content is as desired -> confirm the automatically detected metadata is as desired, and if not, option to correct it -> feature is submitted

h/t @dyuliu

@micahjsmith micahjsmith added the enhancement New feature or request label Jun 16, 2021
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

No branches or pull requests

1 participant