{"id":18026797,"url":"https://github.com/yegor256/0pdd","last_synced_at":"2025-04-05T11:09:32.669Z","repository":{"id":14090569,"uuid":"75934670","full_name":"yegor256/0pdd","owner":"yegor256","description":"Puzzle Driven Development (PDD) Chatbot Assistant for Your GitHub Repositories","archived":false,"fork":false,"pushed_at":"2024-10-18T23:35:53.000Z","size":2381,"stargazers_count":128,"open_issues_count":74,"forks_count":32,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-19T21:13:39.208Z","etag":null,"topics":["github-tools","pdd-puzzles","ruby","sinatra","tool","xml"],"latest_commit_sha":null,"homepage":"https://www.0pdd.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yegor256.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-08T12:12:59.000Z","updated_at":"2024-10-18T23:35:06.000Z","dependencies_parsed_at":"2023-09-28T03:47:16.053Z","dependency_job_id":"6bb94cca-e0a5-4f0a-a02e-1045b4d8f92a","html_url":"https://github.com/yegor256/0pdd","commit_stats":null,"previous_names":[],"tags_count":131,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2F0pdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2F0pdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2F0pdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2F0pdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/0pdd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-tools","pdd-puzzles","ruby","sinatra","tool","xml"],"created_at":"2024-10-30T08:08:05.800Z","updated_at":"2025-04-05T11:09:32.650Z","avatar_url":"https://github.com/yegor256.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"logo\" src=\"https://avatars2.githubusercontent.com/u/24456188\" width=\"64px\" height=\"64px\"/\u003e\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](https://www.rultor.com/b/yegor256/0pdd)](https://www.rultor.com/p/yegor256/0pdd)\n[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)\n\n[![rake](https://github.com/yegor256/0pdd/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/0pdd/actions/workflows/rake.yml)\n[![Availability at SixNines](https://www.sixnines.io/b/574a)](https://www.sixnines.io/h/574a)\n[![Webhook via ReHTTP](https://www.rehttp.net/b?u=http%3A%2F%2Fwww.0pdd.com%2Fhook%2Fgithub)](https://www.rehttp.net/i?u=http%3A%2F%2Fwww.0pdd.com%2Fhook%2Fgithub)\n[![PDD status](https://www.0pdd.com/svg?name=yegor256/0pdd)](https://www.0pdd.com/p?name=yegor256/0pdd)\n[![Maintainability](https://api.codeclimate.com/v1/badges/7462387124cf5f9b8ef8/maintainability)](https://codeclimate.com/github/yegor256/0pdd/maintainability)\n[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/0pdd.svg)](https://codecov.io/github/yegor256/0pdd?branch=master)\n[![Hits-of-Code](https://hitsofcode.com/github/yegor256/0pdd)](https://hitsofcode.com/view/github/yegor256/0pdd)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d23061346143451db3abedca5ad9cbf2)](https://www.codacy.com/gh/yegor256/0pdd/dashboard)\n\nRead this blog post first: [PDD in Action](https://www.yegor256.com/2017/04/05/pdd-in-action.html).\nTL;DR:\n\n  1. Your boss tells you to fix issue `#42`\n  1. You do it, but not completely (you have no time, you are lazy, etc.)\n  1. You put `TODO #42:30min bla-bla-bla` into the code base (in a pull request)\n  1. CI checks that you didn't break the format of the `TODO` (reuse our [`pdd.yml`](https://github.com/yegor256/0pdd/blob/master/.github/workflows/pdd.yml))\n  1. You merge the pull request\n  1. The bot picks up the `TODO` and creates issue `#43` (new one)\n  1. The boss asks your friend to fix `#43`\n  1. The friend fixes it, and merges\n  1. The `TODO` is gone from the code base\n  1. The bot closes the issue `#43`\n\n[0pdd.com](https://www.0pdd.com) is a hosted service that\nfinds new \"puzzles\" in your repository and posts them as GitHub\nissues. To start using it just create a\n[Webhook](https://developer.github.com/webhooks/creating/) in your repository\njust for `push` events with `https://www.0pdd.com/hook/github` payload URL and\n`application/json` content type.\n\nThen, add [@0pdd](https://github.com/0pdd) GitHub user as a\n[collaborator](https://help.github.com/articles/inviting-collaborators-to-a-personal-repository/)\nto your repository, if it's private\n(you don't need this for a public repository). If your invitation is not accepted by [@0pdd](https://github.com/0pdd) in 30mins, please visit this address https://0pdd.com/invitation?repo={REPO_FULL_NAME} - `REPO_FULL_NAME` is the full name of your repo e.g `yegor256/0pdd`\n\nThen, add a `@todo` [puzzle](https://www.yegor256.com/2009/03/04/pdd.html)\nto the source code (format it [right](https://github.com/teamed/pdd)).\n\nThen, `git push` to master branch something and see what happens. You should see a new\nissue created in your repository by [@0pdd](https://github.com/0pdd).\n\nThe dependency tree of all puzzles in your repository you can find\nhere: https://www.0pdd.com/p?name=yegor256/0pdd (just replace the name\nof the repo in the URL).\n\nDon't forget to add that cute little badge to your `README.md`, just\nlike we did here in this repo (see above). The Markdown you need\nwill look like this (replace `yegor256/0pdd` with GitHub coordinates\nof your own repository):\n\n```markdown\n[![PDD status](https://www.0pdd.com/svg?name=yegor256/0pdd)](https://www.0pdd.com/p?name=yegor256/0pdd)\n```\n\n## How to configure?\n\nThe only way to configure 0pdd is to add `.0pdd.yml` file to the\nroot directory of your `master` branch (see [this one](https://github.com/yegor256/0pdd/blob/master/.0pdd.yml) as a live example).\nIt has to be a [YAML](https://en.wikipedia.org/wiki/YAML) file with the following\noptional parameters inside:\n\n```yaml\nthreshold: 10\nmodel: true\nerrors:\n  - yegor256@gmail.com\nalerts:\n  suppress:\n    - on-found-puzzle\n    - on-lost-puzzle\n    - on-scope\n  github:\n    - yegor256\nformat:\n  - short-title\n  - title-length=100\ntags:\n  - pdd\n  - bug\n```\n\nThe element `threshold` allows you to limit the number of issues created from the puzzles in your code. In the example above, each time the appropriate push event is sent to your webhook up to 10 issues will be created regardless of the number of puzzles found in the code. If this limit is not set, `threshold` is assumed to be equal to 256.\n\nSection `errors` allows you to specify a list of email addresses which will\nreceive notifications when PDD processing fails for your repo. It's\na very useful feature, since very often programmers make\nmistakes in PDD puzzle formatting. We would recommend you use this feature.\n\nSection `alerts` allows you to specify users that will be notified when\nnew PDD puzzles show up. By default we will just submit GitHub tickets\nand that's it. If you add `github` subsection there, you can list GitHub\nusers who will be \"notified\": their GitHub nicknames will be added to\neach puzzle description and GitHub will notify them by email.\n\nSubsection `suppress` lets you make 0pdd more quiet, where it's necessary:\n\n- `on-found-puzzle`: stay quiet when a new puzzle is discovered\n\n- `on-lost-puzzle`: stay quiet when a puzzle is gone\n\n- `on-scope`: stay quiet when child puzzles change statuses\n\n`--model`\n\nThe `model` option used by [0pdd](https://github.com/yegor256/0pdd#readme) to opt-in to use ML model which prioritizes puzzles generated by `pdd`. If you would like to opt-in to puzzle prioritization, then add this option to your _.0pdd.yml_ config file at the root of your project.\n\n[pdd](https://github.com/yegor256/pdd) is the tool that parses your source\ncode files. You can configure its behavior by adding `.pdd` file to the\nroot directory of the repository. Take\n[this one](https://github.com/yegor256/0pdd/blob/master/.pdd), as an example.\n\nThe `format` section helps you instruct 0pdd about GitHub issues formatting.\nThese options are supported:\n\n- `short-title`: issue title will not include file name and line numbers\n\n- `title-length=...`: you may configure the length of the title of GitHub\n  issues we create. Minimim length is 30, maximum is 255. Any other values\n  will be silently ignored. The default length is 60.\n\nThe `tags` section lists GitHub labels that will automatically be attached\nto all new issues we create. If you don't have that labels in your GitHub\nrepository, they will automatically be created.\n\nTo exclude files from analysis, create a `.pdd` file with the following content:\n\n```\n--exclude=path/to/file.txt\n```\n\nSee: [pdd usage](https://github.com/cqfn/pdd?tab=readme-ov-file#usage)\n\n## What to expect?\n\nPay attention to the comments @0pdd posts to your commits. They will\ncontain valuable information about its recent actions. If something goes\nwrong, you will receive exception messages there. Please, post them here\nas new issues.\n\nRemember that GitHub triggers us only when you do `git push`. This means that\nif you make a number of commits, we will process them all together. Only the\nlatest one will be commented. It may not be the one with new puzzles though.\n\nAfter we create GitHub issues you can modify their titles and descriptions. You\ncan work with them as with any other issues. We will touch them only one\nmore time, when the puzzle disappears from the source code. At that moment\nwe will try to close the issue. If it is already closed, nothing will happen.\nHowever, it's not a good practice to close them manually. You better remove\nthe necessary puzzle from the source code and let us close the issue.\n\n## How to contribute?\n\nIt is a Ruby project.\nFirst, install\n[Java SDK 8+](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html),\n[Maven 3.2+](https://maven.apache.org/),\n[Ruby 2.3+](https://www.ruby-lang.org/en/documentation/installation/),\n[Rubygems](https://rubygems.org/pages/download),\nand\n[Bundler](https://bundler.io/).\nThen:\n\n```bash\n$ bundle update\n$ rake\n```\n\nThe build has to be clean. If it's not, [submit an issue](https://github.com/yegor256/0pdd/issues).\n\nThen, make your changes, make sure the build is still clean,\nand [submit a pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).\n\nTo run it locally:\n\n```\n$ rake run\n```\n\nIf you want to run it on your own machine, you will need to add this\n`config.yml` file to the root directory of this repository:\n\n```yaml\ns3:\n  region: us-east-1\n  bucket: xml.0pdd.com\n  key: AKIAI..........UTSQA\n  secret: Z2FbKB..........viCKaYo4H..........vva21\nsentry: https://....@sentry.io/229223\ndynamo:\n  region: us-east-1\n  key: AKIAI..........UTSQA\n  secret: Z2FbKB..........viCKaYo4H..........vva21\ngithub:\n  client_id: b96a3b5..........87e\n  client_secret: be61c471154e2..........66f434d33e0f63a5f\n  encryption_secret: some-random-text\n  login: 0pdd\n  pwd: GitHub-Password\nsmtp:\n  host: email-smtp.us-east-1.amazonaws.com\n  port: 587\n  key: AKIAI..........UTSQA\n  secret: Z2FbKB..........viCKaYo4H..........vva21\nid_rsa: |\n  -----BEGIN RSА PRIVATE KEY-----\n  MIIJKAIBAAKCAgEAoE94Xy8TGMbnoK5cKJXWccr9qLLDc/liKpMAMlnQEFDCgi0l\n  ...\n  NaaFpowFg8LKSiwc04ERduu72Imv5GJBCkhS8F7laURXFcZiYNqBnWYzY0U=\n  -----END RSА PRIVATE KEY-----\n```\n\nWe add this file to the repository while deploying to Heroku,\nsee how it's done in `.rultor.yml`.\n\n## How to install in Heroku\n\nDon't forget this:\n\n```\nheroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2F0pdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2F0pdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2F0pdd/lists"}