{"id":20356029,"url":"https://github.com/project-monai/monai-code-formatter","last_synced_at":"2025-10-08T05:46:00.430Z","repository":{"id":37762985,"uuid":"261171829","full_name":"Project-MONAI/monai-code-formatter","owner":"Project-MONAI","description":"A github action for automatically formatting source code files for MONAI","archived":false,"fork":false,"pushed_at":"2025-01-25T11:06:10.000Z","size":227985,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-25T18:33:57.420Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Project-MONAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-05-04T12:39:31.000Z","updated_at":"2025-01-25T11:06:14.000Z","dependencies_parsed_at":"2023-12-19T14:23:59.013Z","dependency_job_id":"1f28d9ce-f539-4608-9055-14a3d6b04be7","html_url":"https://github.com/Project-MONAI/monai-code-formatter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"actions/container-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Project-MONAI%2Fmonai-code-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Project-MONAI%2Fmonai-code-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Project-MONAI%2Fmonai-code-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Project-MONAI%2Fmonai-code-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Project-MONAI","download_url":"https://codeload.github.com/Project-MONAI/monai-code-formatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241889630,"owners_count":20037545,"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":[],"created_at":"2024-11-14T23:14:47.874Z","updated_at":"2025-10-08T05:46:00.309Z","avatar_url":"https://github.com/Project-MONAI.png","language":"HTML","readme":"# Python code formatter\nThis repo implements two options to format python code with Black using GitHub action.\nThe formatting changes are submitted back to the source branch (PR that triggered the action).\n\n#### option 1 using a formatter workflow\nIt does not work for pull requests from forks due to a limitation of Github token's write permission.\n##### Usage\n```yaml\n- uses: project-monai/monai-code-formatter@master\n  with:\n    # options to the auto formatter (Black)\n    format_args:\n    # email address used to write git commit\n    email:\n    # username used to write git commit\n    username:\n    # commit message\n    message:\n    # access token used to read and write the source branch\n    token:\n```\n\n#### option 2 using the `repository_dispath` event\nIt is implemented by triggering the formatting process using the [slach command dispatch](https://github.com/marketplace/actions/slash-command-dispatch).\nThe workflow file is located at [`.github/workflows/format.yml`](https://github.com/Project-MONAI/monai-code-formatter/blob/master/.github/workflows/format.yml).\n\nMONAI currently adopts this option as it supports both internal and external pull requests,\ngiven that the contributors use the default PR setting -- 'Allow edits and access to secrets by maintainers'.\n\nrepo stats: https://monai.io/monai-code-formatter/Project-MONAI/MONAI/latest-report/report.html\ntutorial stats: https://monai.io/monai-code-formatter/Project-MONAI/tutorials/latest-report/report.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-monai%2Fmonai-code-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproject-monai%2Fmonai-code-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-monai%2Fmonai-code-formatter/lists"}