How to use the nitpick.config.vcs.commit function in nitpick

To help you get started, we’ve selected a few nitpick examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github travisb-ca / nitpick / nitpick.py View on Github external
def cmd_fixby(args):
	load_db()

	if db.change_issue(args.issue, 'Fix_By', args.newfixby):
		if not args.no_commit:
			return config.vcs.commit()
		else:
			return True
	else:
		return False
github travisb-ca / nitpick / nitpick.py View on Github external
def cmd_component(args):
	load_db()

	if db.change_issue(args.issue, 'Component', args.newcomponent):
		if not args.no_commit:
			return config.vcs.commit()
		else:
			return True
	else:
		return False
github travisb-ca / nitpick / nitpick.py View on Github external
fulluser = ''
	for row in config.users:
		if args.newowner in row:
			if fulluser != '':
				print "Ambiguous user. Please be more specific"
				return False
			else:
				fulluser = row

	if fulluser == '':
		print "Unknown user"
		return False

	if db.change_issue(args.issue, 'Owner', fulluser):
		if not args.no_commit:
			return config.vcs.commit()
		else:
			return True
	else:
		return False
github travisb-ca / nitpick / nitpick.py View on Github external
def cmd_state(args):
	load_db()

	if db.change_issue(args.issue, 'State', args.newstate):
		if not args.no_commit:
			return config.vcs.commit()
		else:
			return True
	else:
		return False
github travisb-ca / nitpick / nitpick.py View on Github external
def cmd_type(args):
	load_db()

	if db.change_issue(args.issue, 'Type', args.newtype):
		if not args.no_commit:
			return config.vcs.commit()
		else:
			return True
	else:
		return False
github travisb-ca / nitpick / nitpick.py View on Github external
print 'Creating issue aborted'
		os.unlink(config.db_path + 'new.tmp')
		return True

	issue = {}
	issue = parse_file(config.db_path + 'new.tmp')
	os.unlink(config.db_path + 'new.tmp')

	load_db()
	issue_filename, issue_hash = db.add_issue(issue)
	db.save_issue_db()

	print 'Created issue %s' % issue_hash

	if not args.no_commit:
		return config.vcs.commit()
	else:
		return True
github travisb-ca / nitpick / nitpick.py View on Github external
def cmd_priority(args):
	load_db()

	if db.change_issue(args.issue, 'Priority', args.newpriority):
		if not args.no_commit:
			return config.vcs.commit()
		else:
			return True
	else:
		return False
github travisb-ca / nitpick / nitpick.py View on Github external
def cmd_title(args):
	load_db()

	if db.change_issue(args.issue, 'Title', args.newtitle):
		if not args.no_commit:
			return config.vcs.commit()
		else:
			return True
	else:
		return False
def cmd_state(args):
github travisb-ca / nitpick / nitpick.py View on Github external
def cmd_severity(args):
	load_db()

	if db.change_issue(args.issue, 'Severity', args.newseverity):
		if not args.no_commit:
			return config.vcs.commit()
		else:
			return True
	else:
		return False