A python tool that creates issues in your repos based on TODO comments in your code

Overview

Krypto

tests black Code style: black Coverage Status

A neat little sidekick python script to create issues on your repo based on comments left in the code on your behalf

Convert todo comments in your code
# TODO[Enhancement]: Make config file
# Sometimes you might wanna have TODOs in your tests.
# Right now krypto will completely ignore any file with the
# substring "test" in the path. I would want to be able to
# configure this behaviour. Perhaps read from pyproject.toml?`

to GitHub issues on the repository you're working on!

Sample issue on Github


Env Variables

For this to work you need to have a github token in your environment variables. To acquire a token navigate to Developer Settings and generate one.

With the token in hand, simply,

export TOKEN_GITHUB = token_here

or

$env:TOKEN_GITHUB = token_here

If you want the token to persist across sessions you need to add it to your .bashrc or $PROFILE.

Usage


Write a TODO

First, create a TODO in the form of a block comment. The TODO must contain a title. Body and labels are optional.

Examples:

  • Title only, no body or labels

    # TODO: This is a title
  • Title, body, no labels

    # TODO: This is a title
    # This is in the TODO body
  • Title, body and labels

    # TODO[Enhancement]: This is a title
    # This is in the TODO body
  • Multiple labels

    # TODO[Enhancement, Bug, Documentation]: This is a title

Valid separators include , / # ~ \

To run

Pass the directory to look in for TODOs.

krypto run <path-to-dir>

To perform the collection and parsing of TODOs but not the HTTP request to github, pass the --dry flag to the run command.

krypto run <path-to-dir> --dry

Krypto does not look in tests/ at the moment.


GitHub Action

This action runs Krypto on your code and creates issues on the repo on your behalf.

Inputs

dir

Required The path to the directory to scan for TODOs.

Env

TOKEN_GITHUB

Required A personal access token for github to use to authenticate the creation of issues on your repository.

Example usage

uses: antoniouaa/krypto@v2
with:
  dir: "."
env:
  TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}

Run krypto on the root of the project


Inspired by tsoding/snitch

Comments
  • Possible creation of pre-push git hook

    Possible creation of pre-push git hook

    Think about making this into a git script to hook into the pre-push action instead of having to run the script manually Lets try to test this right now. Considering making a github action instead of a messy post-push hook

    Line: 1 in krypto\__main__.py

    enhancement 
    opened by antoniouaa 4
  • Parsing of title stops at '.' and throws away the rest

    Parsing of title stops at '.' and throws away the rest

    How to reproduce:

    //TODO: ensure foo.bar works.
    // body here
    

    will open an issue with title ensure foo and body body here

    Desired behaviour: Title should be ensure foo.bar works.

    opened by erikoui 2
  • Allow for different standard labels to be attached to the issues

    Allow for different standard labels to be attached to the issues

    Mayhap I would like to assign a todo certain labels like Enhancement Possible syntax # Enhancement: title here or maybe # TODO[Enhancement]: title here Labels are overwritten right now instead of extended

    Line: 18 in krypto\__init__.py

    bug enhancement 
    opened by antoniouaa 2
  • Allow specifying branch name

    Allow specifying branch name

    When krypto creates an issue and attaches a link to the todo locally, it only considers todos in the master branch. It would be nice to be able to either specify which branch you're on or have krypto automatically figure it out and adjust links.

    Line: 19 in krypto/__init__.py

    enhancement 
    opened by antoniouaa 1
  • Add issue number to TODO in code

    Add issue number to TODO in code

    It would be useful to have the assigned issue number from github attached to the TODO in code so you can immediately identify the TODOs

    Line: 138 in krypto/github.py

    enhancement 
    opened by antoniouaa 1
  • Issues are reopened if they're closed through the website

    Issues are reopened if they're closed through the website

    ATM if a user closes an open issue through the Github GUI but does not remove the TODO from the code and reruns krypto, krypto opens a new issue with the same title and body. Krypto should check if an issue with the same title or number exists on github, whether it is closed or still open and decide whether to post or not.

    Line: 35 in krypto\github.py

    bug 
    opened by antoniouaa 1
  • Refactor make_requests

    Refactor make_requests

    It doesnt make sense that a github related function handles attaching links to TODOs in the code locally This should be moved to the krypto.todo file instead

    Line: 132 in krypto/github.py

    opened by antoniouaa 0
  • Make config file

    Make config file

    Sometimes you might wanna have TODOs in your tests. Right now krypto will completely ignore any file with the test substring in the title. I want to be able to configure this behaviour. Perhaps read from pyproject.toml?

    Line: 12 in krypto/__init__.py

    enhancement 
    opened by antoniouaa 0
Owner
Alex Antoniou
CS student attempting to enrich his CV with coding projects or die trying
Alex Antoniou
A TODO-list tool written in Python

PyTD A TODO-list tool written in Python. Its goal is to provide a stable posibility to get a good view over all your TODOs motivate you to actually fi

null 1 Feb 12, 2022
A script to add issues to a project in Github based on label or status.

Add Github Issues to Project (Beta) A python script to move Github issues to a next-gen (beta) Github Project Getting Started These instructions will

Kate Donaldson 3 Jan 16, 2022
Terrible sudoku solver with spaghetti code and performance issues

SudokuSolver Terrible sudoku solver with spaghetti code and performance issues - if it's unable to figure out next step it will stop working, it never

Kamil Bizoń 1 Dec 5, 2021
Purge your likes and wall comments from VKontakte. Set yourself free from your digital footprint.

vk_liberator Regain liberty in the cruel social media world. This program assists you with purging your metadata from Russian social network VKontakte

null 20 Jun 11, 2021
Script to quickly get the metrics from Github repos to analyze.

commit-prefix-analysis Script to quickly get the metrics from Github repos to analyze. Setup Install the Github CLI. You'll know its working when runn

David Carpenter 1 Dec 17, 2022
GitHub saver for stargazers, forks, repos

GitHub backup repositories Save your repos and list of stargazers & list of forks for them. Pure python3 and git with no dependencies to install. GitH

Alexander Kapitanov 23 Aug 21, 2022
Python decorator for `TODO`s

Python decorator for `TODO`s. Don't let your TODOs rot in your python projects anymore !

Klemen Sever 74 Sep 13, 2022
A tool that automatically creates fuzzing harnesses based on a library

AutoHarness is a tool that automatically generates fuzzing harnesses for you. This idea stems from a concurrent problem in fuzzing codebases today: large codebases have thousands of functions and pieces of code that can be embedded fairly deep into the library. It is very hard or sometimes even impossible for smart fuzzers to reach that codepath. Even for large fuzzing projects such as oss-fuzz, there are still parts of the codebase that are not covered in fuzzing. Hence, this program tries to alleviate this problem in some capacity as well as provide a tool that security researchers can use to initially test a code base. This program only supports code bases which are coded in C and C++.

null 261 Jan 4, 2023
Nuclei - Burp Extension allows to run nuclei scanner directly from burp and transforms json results into the issues

Nuclei - Burp Extension Simple extension that allows to run nuclei scanner directly from burp and transforms json results into the issues. Installatio

null 106 Dec 22, 2022
ToDo - A simple bot to keep track of things you need to do

ToDo A simple bot to keep track of things you need to do. Installation You will

null 3 Sep 18, 2022
[x]it! support for working with todo and check list files in Sublime Text

[x]it! for Sublime Text This Sublime Package provides syntax-highlighting, shortcuts, and auto-completions for [x]it! files. Features Syntax highlight

Jan Heuermann 18 Sep 19, 2022
Donatus Prince 6 Feb 25, 2022
Arcpy Tool developed for ArcMap 10.x that checks DVOF points against TDS data and creates an output feature class as well as a check database.

DVOF_check_tool Arcpy Tool developed for ArcMap 10.x that checks DVOF points against TDS data and creates an output feature class as well as a check d

null 3 Apr 18, 2022
Adansons Base is a data management tool that organizes metadata of unstructured data and creates and organizes datasets.

Adansons Base is a data management tool that organizes metadata of unstructured data and creates and organizes datasets. It makes dataset creation more effective and helps find essential insights from training results and improves AI performance.

Adansons Inc 27 Oct 22, 2022
IDA Pro plugin that shows the comments in a database

ShowComments A Simple IDA Pro plugin that shows the comments in a database Installation Copy the file showcomments.py to the plugins folder under IDA

Fernando Mercês 32 Dec 10, 2022
A simple IDA Pro plugin to show all HexRays decompiler comments written by user

XRaysComments A simple IDA Pro plugin to show all HexRays decompiler comments written by user Installation Copy the file xray_comments.py to the plugi

Nox 20 Dec 27, 2022
Allows you to purge all reply comments left by a user on a YouTube channel or video.

YouTube Spammer Purge Allows you to purge all reply comments left by a user on a YouTube channel or video. Purpose Recently, there has been a massive

null 4.3k Jan 9, 2023
Scraping comments from the political section of popular Nigerian blog (Nairaland), and saving in a CSV file.

Scraping_Nairaland This project scraped comments from the political section of popular Nigerian blog www.nairaland.com using the Python BeautifulSoup

Ansel Orhero 1 Nov 14, 2021
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

null 18.6k Jan 2, 2023