[![PyPI](https://img.shields.io/pypi/v/check_done)](https://pypi.org/project/check_done/)
[![Python Versions](https://img.shields.io/pypi/pyversions/check_done.svg)](https://www.python.org/downloads/)
[![Build Status](https://github.com/siisurit/check_done/actions/workflows/build.yml/badge.svg)](https://github.com/siisurit/check_done/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/siisurit/check_done/graph/badge.svg?token=UIJZUCUJII)](https://codecov.io/gh/siisurit/check_done)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![License](https://img.shields.io/github/license/siisurit/check_done)](https://opensource.org/licenses/BSD-3-Clause)
# check_done
Check_done is a command line tool to check that GitHub issues and pull requests in a project board with a status of "Done" are really done.
It checks that:
- It is closed.
- It has an assignee.
- It is assigned to a milestone.
- All tasks are completed (checkboxes in the description).
Additionally, for pull requests, it checks if they reference an issue.
This ensures a consistent quality on done issues and pull requests, and helps to notice if they were accidentally deemed to be done too early.
## Installation
In order to gain access to your project board, issues, and pull requests, check_done needs to be authorized. The exact way to do that depends on whether your project belongs to a GitHub user or organization.
For user projects, [create a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with the permission: `read:project`.
For organization projects, follow the instructions to [Installing a GitHub App from a third party](https://docs.github.com/en/apps/using-github-apps/installing-a-github-app-from-a-third-party) using the [Check_done app](https://github.com/apps/check-done-app). Remember the **app ID** and **private key** of the installed app in order to use for configuration.
## Configuration
Check_done can be configured by having a `.check_done.yaml` in your current directory, or any of the directories above.
Alternatively, you can specify a specific location, for example:
```bash
check_done --config some/path/.check_done.yaml
```
### Project and authentication
A minimum configuration requires the URL of the project board and the authentication information from the installation.
The project URL can be seen in the web browser's URL bar when visiting the project board, for example: `https://github.com/users/my-username/projects/1/views/1` (for a user) or `https://github.com/my-organization/projects/1/` (for an organization).
An example of a user project could look like this:
```yaml
project_url: "https://github.com/users/my-username/projects/1/views/1"
personal_access_token: "ghp_xxxxxxxxxxxxxxxxxxxxxx"
```
For an organization project:
```yaml
project_url: "https://github.com/orgs/my_username/projects/1/views/1"
github_app_id: "1234567"
github_app_private_key: "-----BEGIN RSA PRIVATE KEY-----
something_something
-----END RSA PRIVATE KEY-----
"
```
In order to avoid having to commit tokens and keys into your repository, you can use environment variables for the values in the configuration YAML by starting them with a `$` symbol and wrapping them with curly braces. For example:
```yaml
personal_access_token: ${MY_PERSONAL_ACCESS_TOKEN_ENVVAR}
```
### Changing the project status to check
By default, check_done checks all issues and pull requests in the last selectable project status. If you left the default names when creating the GitHub project board, this would be the `"✅ Done"` project status.
If you want to check a different project status, you can specify a partial or exact matching name with this option. For example:
```yaml
project_status_name_to_check = "Done"
```
The name takes the first project status that partially matches the case sensitivity. For example, `"Done"` will also match `"✅ Done"`, but not `"done"`.
If no project status matches, the resulting error messages will show you the exact name of the available project status selections.
Raw data
{
"_id": null,
"home_page": "https://github.com/siisurit/check_done",
"name": "check_done",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.11",
"maintainer_email": null,
"keywords": "check, closed, done, done done, finished, issue, task, validate",
"author": "Siisurit e.U.",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/8c/31/9ab450939dc7d3e5fec15152c076e2c7337d6981014d1aa101960d8a00b0/check_done-1.1.0.tar.gz",
"platform": null,
"description": "[![PyPI](https://img.shields.io/pypi/v/check_done)](https://pypi.org/project/check_done/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/check_done.svg)](https://www.python.org/downloads/)\n[![Build Status](https://github.com/siisurit/check_done/actions/workflows/build.yml/badge.svg)](https://github.com/siisurit/check_done/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/siisurit/check_done/graph/badge.svg?token=UIJZUCUJII)](https://codecov.io/gh/siisurit/check_done)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![License](https://img.shields.io/github/license/siisurit/check_done)](https://opensource.org/licenses/BSD-3-Clause)\n\n# check_done\n\nCheck_done is a command line tool to check that GitHub issues and pull requests in a project board with a status of \"Done\" are really done.\n\nIt checks that:\n\n- It is closed.\n- It has an assignee.\n- It is assigned to a milestone.\n- All tasks are completed (checkboxes in the description).\n\nAdditionally, for pull requests, it checks if they reference an issue.\n\nThis ensures a consistent quality on done issues and pull requests, and helps to notice if they were accidentally deemed to be done too early.\n\n## Installation\n\nIn order to gain access to your project board, issues, and pull requests, check_done needs to be authorized. The exact way to do that depends on whether your project belongs to a GitHub user or organization.\n\nFor user projects, [create a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with the permission: `read:project`.\n\nFor organization projects, follow the instructions to [Installing a GitHub App from a third party](https://docs.github.com/en/apps/using-github-apps/installing-a-github-app-from-a-third-party) using the [Check_done app](https://github.com/apps/check-done-app). Remember the **app ID** and **private key** of the installed app in order to use for configuration.\n\n## Configuration\n\nCheck_done can be configured by having a `.check_done.yaml` in your current directory, or any of the directories above.\n\nAlternatively, you can specify a specific location, for example:\n\n```bash\ncheck_done --config some/path/.check_done.yaml\n```\n\n### Project and authentication\n\nA minimum configuration requires the URL of the project board and the authentication information from the installation.\n\nThe project URL can be seen in the web browser's URL bar when visiting the project board, for example: `https://github.com/users/my-username/projects/1/views/1` (for a user) or `https://github.com/my-organization/projects/1/` (for an organization).\n\nAn example of a user project could look like this:\n\n```yaml\nproject_url: \"https://github.com/users/my-username/projects/1/views/1\"\npersonal_access_token: \"ghp_xxxxxxxxxxxxxxxxxxxxxx\"\n```\n\nFor an organization project:\n\n```yaml\nproject_url: \"https://github.com/orgs/my_username/projects/1/views/1\"\ngithub_app_id: \"1234567\"\ngithub_app_private_key: \"-----BEGIN RSA PRIVATE KEY-----\nsomething_something\n-----END RSA PRIVATE KEY-----\n\"\n```\n\nIn order to avoid having to commit tokens and keys into your repository, you can use environment variables for the values in the configuration YAML by starting them with a `$` symbol and wrapping them with curly braces. For example:\n\n```yaml\npersonal_access_token: ${MY_PERSONAL_ACCESS_TOKEN_ENVVAR}\n```\n\n### Changing the project status to check\n\nBy default, check_done checks all issues and pull requests in the last selectable project status. If you left the default names when creating the GitHub project board, this would be the `\"\u2705 Done\"` project status.\n\nIf you want to check a different project status, you can specify a partial or exact matching name with this option. For example:\n\n```yaml\nproject_status_name_to_check = \"Done\"\n```\n\nThe name takes the first project status that partially matches the case sensitivity. For example, `\"Done\"` will also match `\"\u2705 Done\"`, but not `\"done\"`.\n\nIf no project status matches, the resulting error messages will show you the exact name of the available project status selections.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Check done issues on a GitHub project board",
"version": "1.1.0",
"project_urls": {
"Changelog": "https://github.com/siisurit/check_done/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/siisurit/check_done/blob/main/README.md",
"Homepage": "https://github.com/siisurit/check_done",
"Issue Tracker": "https://github.com/siisurit/check_done/issues",
"Repository": "https://github.com/siisurit/check_done.git"
},
"split_keywords": [
"check",
" closed",
" done",
" done done",
" finished",
" issue",
" task",
" validate"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3903ff4ed409c54addd3476e2b1f7b3b628097669b2adc4d860847e2fd51811f",
"md5": "f0de03f305fa6e6dcb9951f7e912da6e",
"sha256": "8de746c06f309122b3bba3fc5b5579529f079ef3989e69a7e089d480b0838451"
},
"downloads": -1,
"filename": "check_done-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f0de03f305fa6e6dcb9951f7e912da6e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.11",
"size": 17024,
"upload_time": "2024-12-10T02:56:27",
"upload_time_iso_8601": "2024-12-10T02:56:27.127713Z",
"url": "https://files.pythonhosted.org/packages/39/03/ff4ed409c54addd3476e2b1f7b3b628097669b2adc4d860847e2fd51811f/check_done-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8c319ab450939dc7d3e5fec15152c076e2c7337d6981014d1aa101960d8a00b0",
"md5": "08b11bd9855bdad3fd9c744b01da6f1b",
"sha256": "5fb2d2c12a302853174bd70afad389b37ccec1aed964fdfdf8109b3ee59bf4c5"
},
"downloads": -1,
"filename": "check_done-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "08b11bd9855bdad3fd9c744b01da6f1b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.11",
"size": 14721,
"upload_time": "2024-12-10T02:56:29",
"upload_time_iso_8601": "2024-12-10T02:56:29.359631Z",
"url": "https://files.pythonhosted.org/packages/8c/31/9ab450939dc7d3e5fec15152c076e2c7337d6981014d1aa101960d8a00b0/check_done-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-10 02:56:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "siisurit",
"github_project": "check_done",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "check_done"
}