<#3253 feat: Add `meltano hub publish` command to ...
# meltano-repo-activity
g
#3253 feat: Add `meltano hub publish` command to auto-generate MRs for new hub submissions Issue created by MeltyBot Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/3330 Originally created by @aaronsteers on 2022-03-10 174949 --- @alexmarple had a great idea of adding a
meltano publish
command to get new utilities into the hub. User Story: "As a plugin author, I want to publish my custom plugin to MeltanoHub." Publishing Plugins with
meltano publish
Step 1: Author builds and tests their plugin. The user builds their plugin and gets it tested to a good working status. Step 2: Author adds the plugin to their project via
meltano add --custom
The author can iterate on the plugin definition directly in their
meltano.yml
file. Auto-scraping from
--about
For taps and targets, Meltano may attempt to scrape metadata by invoking the plugin using
tap-myextractor --about --format=json
. If successful, certain entries in the following process will be auto-populated. If not successful, the user will provide the inputs via prompt. Step 3: Author runs
meltano publish extractor tap-myextractor
The author tells Meltano they want to publish a plugin definition from their currently active project. Step 4: Author answers prompts The author answers a series of additional prompts, as needed to complete the necessary metadata. These prompts are provided via Meltano's Click integration, similar to the
meltano add --custom extractor
interface today. Step 5: Final review and edits Meltano at this point can generate the plugin yaml file needed for a publish to the hub. Optionally, Meltano can print all of the info for review and/or open a text editor which allows the author to make necessary updates or additions before publishing. Step 6: Auth and Publish When the definition is complete, Meltano will check for a GitLab personal access token in the environment variables. If none are detected, Meltano will prompt the user to create a token and input it to the console. Meltano will use the GitLab token to submit a PR to the Hub project on their behalf. Meltano will print the URL to the PR so the author can keep track of approval process and answer any questions from the team. Since they are the author also on the PR, we can contact them directly via Gitlab PR comments. Step 7: Internal Meltano Testing and review In response to the new PR, CI pipelines will automatically run tests on the submitted data. Any follow-up or issues will lead Meltano team to follow up with the submitter via their PR. meltano/meltano