4

I am new to Git and did not find any reference for such a question. One un-answered post here at StackOverflow is Similar Post, also I found this Possible similar problem but I did not find an answer there as well..

I have some //TODO <need to remember this> remarks in my java program and I would have loved to convert them into a bug/task/issue using github/bitbucket.

Is that possible?

Thanks in advance

Community
  • 1
  • 1
mestrebisli
  • 83
  • 1
  • 8

2 Answers2

2

You can easily extract all your //TODOs with grep:

grep TODO -rnf * > TODOs.txt

Then it should be possible to write a small script that reads this TODOs.txt file and makes use of Github's api to create new issues:

POST /repos/:owner/:repo/issues

{
  "title": "Found a bug",
  "body": "I'm having a problem with this.",
  "assignee": "octocat",
  "milestone": 1,
  "labels": [
    "Label1",
    "Label2"
  ]
}

But this is left as an exercise ;)

Community
  • 1
  • 1
OlivierBlanvillain
  • 7,701
  • 4
  • 32
  • 51
1

https://github.com/naholyr/github-todos seems pertinent.

Github-Todos is a git hook to convert your TODOs into Github issues.

Alice Purcell
  • 12,622
  • 6
  • 51
  • 57