{"id":28201558,"url":"https://github.com/swiftlysingh/swiftui-accessibility-bot","last_synced_at":"2025-08-20T15:40:48.558Z","repository":{"id":293139938,"uuid":"976236966","full_name":"swiftlysingh/swiftui-accessibility-bot","owner":"swiftlysingh","description":"A bot that applies accessibility improvements to SwiftUI views and creates a PR.","archived":false,"fork":false,"pushed_at":"2025-05-13T20:57:57.000Z","size":59,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T21:48:10.651Z","etag":null,"topics":["accessibility","actions","ai","llm","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Python","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/swiftlysingh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2025-05-01T18:41:40.000Z","updated_at":"2025-05-13T20:57:57.000Z","dependencies_parsed_at":"2025-05-13T21:48:14.653Z","dependency_job_id":null,"html_url":"https://github.com/swiftlysingh/swiftui-accessibility-bot","commit_stats":null,"previous_names":["swiftlysingh/swiftui-accessibility-bot"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/swiftlysingh/swiftui-accessibility-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlysingh%2Fswiftui-accessibility-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlysingh%2Fswiftui-accessibility-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlysingh%2Fswiftui-accessibility-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlysingh%2Fswiftui-accessibility-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiftlysingh","download_url":"https://codeload.github.com/swiftlysingh/swiftui-accessibility-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlysingh%2Fswiftui-accessibility-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263247664,"owners_count":23436884,"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":["accessibility","actions","ai","llm","swiftui"],"created_at":"2025-05-16T23:12:56.583Z","updated_at":"2025-07-03T02:34:07.909Z","avatar_url":"https://github.com/swiftlysingh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swiftui-accessibility-bot\n\nThis GitHub Action automatically reviews and applies accessibility improvements to your SwiftUI views using OpenAI's language models. It then creates a pull request with the suggested changes.\n\n## Features\n\n-   **Automated Accessibility Improvements**: Leverages LLMs to identify and suggest accessibility enhancements for your SwiftUI code.\n-   **Customizable OpenAI Model**: Specify the OpenAI model you want to use (e.g., `gpt-4`, `gpt-4.1`, `gpt-4-turbo`). Defaults to `gpt-4.1`.\n-   **Process Specific Files**:\n    -   Process all SwiftUI files in the repository.\n    -   Process only SwiftUI files that were changed in the current commit.\n-   **Pull Request Creation**: Automatically creates a pull request with the applied changes.\n\n## Inspiration\n\nThis project was inspired by the talk and work of Allison McEntire on accessibility. You can find more about her insights here: [gist.github.com/allisonpaigemcentire](https://gist.github.com/allisonpaigemcentire/719b856796d599e9d758e8a1343b5bd8).\n\n## Important Considerations\n\n-   **Code Modification**: This bot directly modifies your codebase by applying accessibility improvements. It is **highly recommended** that you carefully review all changes proposed in the pull requests created by this bot before merging them.\n-   **Model Behavior**: The quality and nature of the suggestions depend on the OpenAI model used. While the bot aims to apply only additive accessibility modifiers, always verify the changes.\n\n## Prerequisites\n\n1.  **OpenAI API Key**: You need an OpenAI API key with access to the desired models. This key should be stored as a secret in your GitHub repository (e.g., `OPENAI_API_KEY`).\n2.  **GitHub Token**: The action uses a GitHub token to create branches and pull requests. The default `GITHUB_TOKEN` provided by GitHub Actions usually has the necessary permissions.\n\n## Permissions Required\n\nFor this action to function correctly, it needs permissions to:\n-   Read repository contents.\n-   Write repository contents (to commit changes and push a new branch).\n-   Create pull requests.\n\nYou may need to adjust your repository's settings to grant these permissions to GitHub Actions. Navigate to your repository's `Settings \u003e Actions \u003e General` and ensure that \"Workflow permissions\" are set to \"Read and write permissions\". If you restrict the default `GITHUB_TOKEN` permissions, you might need to provide a token with sufficient scopes.\n\n## Usage\n\nTo use this action in your workflow, add a step similar to the following:\n\n```yaml\nname: SwiftUI Accessibility Check\n\non: [push] # Or your preferred trigger\n\njobs:\n  accessibility-bot:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write      # Required to push new branches\n      pull-requests: write # Required to create PRs\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          # fetch-depth: 0 is recommended to fetch all history.\n          # This is crucial if using `process_changed_files_only: true` \n          # or if your action needs to reliably determine the base branch for PRs.\n          fetch-depth: 0 \n\n      - name: Run SwiftUI Accessibility Bot\n        uses: your-username/swiftui-accessibility-bot@v1 # Replace with your action's path or version\n        env:\n          GH_TOKEN: ${{ github.token }} # Pass the GitHub token for PR creation and push\n        with:\n          openai_api_key: ${{ secrets.OPENAI_API_KEY }}\n          # Optional: Specify a different OpenAI model\n          # openai_model_name: 'gpt-4-turbo'\n          # Optional: Process only files changed in the current commit\n          # process_changed_files_only: true\n```\n\n### Inputs\n\nRefer to the `action.yml` file for a complete list of inputs and their descriptions.\n\n-   `openai_api_key` (required): Your OpenAI API key.\n-   `openai_model_name` (optional): The OpenAI model to use. Defaults to `gpt-4.1`.\n-   `process_changed_files_only` (optional): Set to `true` to only process files changed in the current commit. Defaults to `false`.\n\n### Outputs\n\n-   `branch-name`: The name of the branch created with the accessibility improvements.\n-   `files-modified`: The number of files modified by the bot.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlysingh%2Fswiftui-accessibility-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftlysingh%2Fswiftui-accessibility-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlysingh%2Fswiftui-accessibility-bot/lists"}