`@inlang/cross-sell-ninja` package
Closed this issue · 3 comments
samuelstroschein commented
Proposal
Enable apps to cross-sell ninja with a package that exports two functions:
isAdopted(args)
- checks if a github workflow file contains ninja/can be used to show a prompt to a useradd(args)
- adds a ninja github action to the repo
import { isAdopted, add } from "@inlang/cross-sell-ninja"
// check if ninja is adopted (a github workflow file contains ninja)
if (await isAdopted(fs) === false){
// prompt the user
const response = await showPrompt()
if (response === true){
// add ninja
await add(fs)
}
}
Additional information
- i recommend to create the package in
inlang/source-code/cross-sell/ninja
Requirements
- code is isomorphic (works in browser and node)
- returns
isAdopted() === true
if no github action is found (don't add github actions if users use gitlab etc)
Follow up tasks
felixhaeberle commented
@NiklasBuchfink can you provide an ETA for this? I want to start cross-selling Ninja as early as possible in the VS code extension
NiklasBuchfink commented
@felixhaeberle I'm happy to hear you are interested in cross-selling Ninja as soon as possible. I haven't looked at the Sherlock cross-selling package and don't know how much work that would be, as Ninja should have a product page first and needs to be published on the GitHub marketplace.
NiklasBuchfink commented
Thank you @felixhaeberle for your help. This package has now been tested, merged and can be used by apps.
Happy Easter 🐰