Np: Doesn't open Github release notes when using arguments

Created on 25 Mar 2019  路  2Comments  路  Source: sindresorhus/np

Description

When passing in arguments (eg. np minor) it skips the UI (which is the part that determines the repoUrl) and consequently skips the 'Creating release draft on GitHub' task.

Steps to reproduce

  1. Setup a Github repo
  2. npx np minor
  3. Don't see publish draft page

Expected behavior

  1. For the publish draft to open
bug help wanted

Most helpful comment

Looking at ui.js, I think we should move the releaseNotes creation into a separate file, and extract the repoUrl detection from it (the detection should be done when using np programmatically as well, but I'm not sure what's the best way to organize this).
It seems like ui.js currently contains lots of functionality that is outside of its scope (as it belongs to the general scope of np), which should be separated from it to keep it single-purposed and maintainable.

All 2 comments

Looking at ui.js, I think we should move the releaseNotes creation into a separate file, and extract the repoUrl detection from it (the detection should be done when using np programmatically as well, but I'm not sure what's the best way to organize this).
It seems like ui.js currently contains lots of functionality that is outside of its scope (as it belongs to the general scope of np), which should be separated from it to keep it single-purposed and maintainable.

Was this page helpful?
0 / 5 - 0 ratings