npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

leankit-boardrules

v1.0.1

Published

Simple rule runner that does things to cards on a LeanKit board. More info: https://github.com/vc3/LeanKit-BoardRules

Downloads

8

Readme

LeanKit-BoardRules

Node script and module that does things to cards on a LeanKit board.

Installation:

npm install leankit-boardrules -g

Command Line Usage:

leankit-boardrules email password <execute|report> configFile');

Arguments:

  • email: Email address of user to connect as
  • password: Password of user to connect as
  • execute: Specify to execute the rules
  • report: Specify to show a report of what will occur if rules are executed
  • configFile: JavaScript file that defines the rule configuration (exports = {account, boardId, rules})

Example config file:

Config files are just node modules (single JavaScript file) that exports the following:

  • account: The name of your organization account registered with LeanKit.com

  • boardId: The id of the board the rules apply to. You can get this by looking at the URL to a card on the board. Its the first large number in the URL.

  • rules: Array of card selectors and actions. Check out sample-rules.js for an example.

Example Config:


// How long to wait until a card is demoted in the backlog
var daysUntilDemontion = 30;

exports.account = 'your-account-name';
exports.boardId = 123456789;

exports.rules = [
	// Promote cards with activity
	{
		cards: { in_lane: 'Backlog|Aging Out|Generation 2', modified: { after_last: 'Move' } },
		actions: { move_to: { lane: 'Backlog|Aging Out|Generation 1' } }
	},
	{
		cards: { in_lane: 'Backlog|Aging Out|Generation 3', modified: { after_last: 'Move' } },
		actions: { move_to: { lane: 'Backlog|Aging Out|Generation 1' } }
	},

	// Demote cards without activity
	{
		cards: { in_lane: 'Backlog|Aging Out|Generation 1', not_modified: { in_days: daysUntilDemontion } },
		actions: { move_to: { lane: 'Backlog|Aging Out|Generation 2' } }
	},
	{
		cards: { in_lane: 'Backlog|Aging Out|Generation 2', not_modified: { in_days: daysUntilDemontion } },
		actions: { move_to: { lane: 'Backlog|Aging Out|Generation 3' } }
	},

	// Age out cases
	{
		cards: { in_lane: 'Backlog|Aging Out|Generation 3', not_modified: { in_days: daysUntilDemontion }, tagged: 'case' },
		actions: { move_to: { lane: 'Backlog|Aged Cases' } }
	},

	// Age out non-cases
	{
		cards: { in_lane: 'Backlog|Aging Out|Generation 3', not_modified: { in_days: daysUntilDemontion }, not_tagged: 'case' },
		actions: { move_to: { lane: 'Archive|Aged Out' } }
	}
];

Card Selectors

These selectors apply to all cards in the backlog, in process and archive areas of a board.

Selectors can be extended by adding factory methods to the boardRules.if object. Send a pull request if you'd like to share a selector.

in_lane

Selects all cards in a lane, excluding sub-lanes. Argument is the full, pipe-delimited name of the lane.

Example:

{in_lane: 'Backlog|Next Up'}

modified

Selects cards modified within a period of time.

Options:

  • after_last: 'move'
  • since:
  • id_days:
  • in_hours:
  • in_minutes:
  • in_seconds:

Example: cards modified after they were last moved

{modified: {after_last: 'mode'}}

Example: cards modified within the last week

{modified: {in_days: 7}}

Example: cards modified after a specific date and time

{modified: {since: aJavaScriptDate}}

tagged

Selects cards that are tagged with a specific tag. Tag matching is case insensitive.

Example:

{tagged: 'YourTagName'}

not_in_lane, not_modified, not_tagged

Appending 'not_' to a selector will invert it. All cards that it would normally exclude will be selected and those normally selected, excluded.

Card Actions

Currently there's only one card action: move_to. However, actions are extensible if you'd like to add more (see: boardRules.do). Send a pull request if you'd like to share an action you've written.

move_to

Moves cards into a lane

  • lane: Pipe-delimited full title of the lane. For example: 'Backlog|Next Up'
  • wipOverrideReason: Optional reason for a WIP override if one is needed to move the card into the lane

Example: move cards to the archive

{move_to: {lane: 'Archive' }}

Example: move cards to the 'Next Up' lane and specify a WIP override reason if needed

{move_to: {lane: 'Backlog|Up Next', wipOverrideReason: 'This is another number one priority!' }}

Test Coverage

There's pretty good test coverage of the selectors and actions. Tests require Jasmine to run and are in the spec folder.

jasmine-node spec