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

Add second set of eyes milestones or issues when creating project #11

Open
akastanisAP opened this issue Feb 23, 2023 · 2 comments
Open

Comments

@akastanisAP
Copy link

  • datakit-gitlab version:
  • Python version:
  • Operating System:

Description

I would like to have an option to add template issues or milestones for a specific purpose (second set of eyes). The issues or milestones can either be included with every data project when it is created or have the option to add the issues with a quick command.

Ideally, the issue being created would have some text in the "description" section as well. Right now, we can add an issue in the command line with a title but no description.

For the second set of eyes process, I can see the template being one milestone with 3 issues. Each issue would have a description with a couple checkboxes to complete.

What I Did

Currently, we have the option to add an issue using the following code.

datakit git issues add -title "Example ticket"
@zstumgoren
Copy link
Contributor

@akastanisAP This is a cool idea. I think a two-pronged approach could make this possible in a way that keeps the datakit-gitlab code as generic as possible while allowing you to automatically create one or more custom issue types. Here's one strategy to consider:

  1. Update the Cookiecutter template(s) that AP uses to include one or more custom GitLab issue templates. If you need any default text for the ticket description, this would be a good place to add it. For example, .gitlab/issue_templates/second_set_of_eyes.md could include some boilerplate common to those types of tickets such as a checklist of TODOs
  2. Update the issues add command to allow the user to interactively select from one or more pre-existing issue templates and add a description flag that lets the user add descriptions to a generic ticket or inject additional text into a pre-existing issue template.

Those are just some preliminary thoughts. Would be interested to hear what @larryfenn and @myersjustinc think...

@zstumgoren
Copy link
Contributor

@akastanisAP I should add that I'm less familiar with Milestones on GitLab. If there's a way to create them based on templates, similar to Issues, the above approach might get you part of the way there.

If not, I wouldn't be surprised if the GitLab API supports creating milestones. To automatically create a milestone along with 3 related issues, you might need a more customized approach than described above, one that is likely pretty specific to AP. I could imagine a post-create Cookiecutter hook being a good solution that ties together the pieces on that front. I've used that kind of approach to streamline things such as automatically bootstrapping new GitHub projects and collaborators to new projects. Here's an example:

https://github.com/stanfordjournalism/cookiecutter-stanford-progj/blob/master/hooks/post_gen_project.py

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