{"id":18427628,"url":"https://github.com/maaassistantarknights/issue-checker","last_synced_at":"2025-04-07T16:33:39.933Z","repository":{"id":53854766,"uuid":"521710382","full_name":"MaaAssistantArknights/issue-checker","owner":"MaaAssistantArknights","description":"Automatically label and comments to new issues or pull requests based on the contents.","archived":false,"fork":false,"pushed_at":"2024-10-31T09:30:51.000Z","size":4633,"stargazers_count":10,"open_issues_count":7,"forks_count":5,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2024-10-31T10:42:28.522Z","etag":null,"topics":["actions","github-actions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/MaaAssistantArknights.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":"2022-08-05T16:42:05.000Z","updated_at":"2024-10-03T04:08:48.000Z","dependencies_parsed_at":"2024-01-25T12:25:33.375Z","dependency_job_id":"db344623-94c8-4306-b0df-50bdab32717f","html_url":"https://github.com/MaaAssistantArknights/issue-checker","commit_stats":{"total_commits":180,"total_committers":4,"mean_commits":45.0,"dds":0.2833333333333333,"last_synced_commit":"980ebdc51d3de5e3f35369b3f4195968d36e6a23"},"previous_names":["maaassistantarknights/issue-checker","zzyyyl/issue-checker"],"tags_count":14,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaaAssistantArknights%2Fissue-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaaAssistantArknights%2Fissue-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaaAssistantArknights%2Fissue-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaaAssistantArknights%2Fissue-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaaAssistantArknights","download_url":"https://codeload.github.com/MaaAssistantArknights/issue-checker/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223286383,"owners_count":17120000,"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":["actions","github-actions"],"created_at":"2024-11-06T05:11:23.431Z","updated_at":"2024-11-06T05:11:24.044Z","avatar_url":"https://github.com/MaaAssistantArknights.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Issue Checker\n\nAutomatically label and comments to new issues or pull requests based on the contents.\n\n## Usage\n\n### Create `.github/issue-checker.yml`\n\nCreate a `.github/issue-checker.yml` file with a list of labels and regex to match to apply the label.\n\n#### Basic Examples\n\n```yaml\n# For labels\nlabels:\n- name: label-1\n  # Add `bug` label if issue contains the word `Bug` or `bug`; Remove if not\n  content: bug\n  regexes: '[Bb]ug'\n- name: enhancement\n  # Add `enhancement` label if issue match all of the regexes; Remove if not; Skip if the label `bug` have been added;\n  regexes: '[Ee]nhancement|[Ff]eature [Rr]equest'\n  skip-if:\n  - label-1\n- name: label-3\n  # Add `Collaborator` label if the issue author is a COLLABORATOR.\n  content: Collaborator\n  author_association: COLLABORATOR\n# For comments\ncomments:\n- name: comments-1\n  # Comment the content below if issue contains the word `Uploading`\n  content:\n    \"You have some files that did not upload successfully, please re-upload them.\"\n  regexes:\n    'Uploading'\n- name: comments-2\n  # Comment the content below if issue contains the links that include snippets listed in url_list\n  content:\n    There are unconfirmed links, please visit with caution.\n  url_mode: deny\n  url_list:\n    - example\\.com/asd # regex\n- name: comments-3\n  # Comment the content below if issue contains the links that don't include any snippets listed in url_list\n  content:\n    There are unconfirmed links, please visit with caution.\n  url_mode: allow_only\n  url_list: # You can use any string property of URL: \"hash\" | \"host\" | \"hostname\" | \"href\" | \"origin\" | \"password\" | \"pathname\" | \"port\" | \"protocol\" | \"search\" | \"username\"\n    - hostname: (?:^|.+\\.)github\\.com$\n      pathname: ^/exapmle-user/example-repo\n```\n\nThe format of the configuration file is shown below.\n\n``` yaml\ndefault-mode:          # optional\n  pull_request:        # optional, choices [pull_request, pull_request_target, issues, issue_comment]\n  - add                # optional, choices [add, remove]\n  - ...\n  ...\nlabels:                # optional, choices [labels, comments]\n- name: string         # required\n  content: string      # optional, default ${name}\n  regexes:             # optional, required if ${author_association} undefined\n    string[] | string\n  url_mode:            # optional, ignored if ${regexes} exists\n    \"allow_only\" | \"deny\"\n  url_list:            # optional, ignored if ${regexes} exists, keeps in mind that if `search` has valud that is must be started with `?` which needs to be escaped\n    (string | Partial\u003cPick\u003cURL, { [K in keyof URL]: URL[K] extends string ? K : never; }[keyof URL]\u003e\u003e)[]\n  author_association:  # optional, required if ${regexes} undefined\n    string\n  remove-if:           # optional\n    string[] | string\n  skip-if:             # optional\n    string[] | string\n  mode:                # optional\n    pull_request:      # optional, choices [pull_request, pull_request_target, issues, issue_comment]\n    - add              # optional, choices [add, remove]\n    - ...\n    ...\n- ...\n...\n```\n\n### Create Workflow\n\nCreate a workflow (eg: `.github/workflows/issue-checker.yml` see [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)) to utilize the labeler action with content:\n\n```yaml\nname: \"Issue Checker\"\non:\n  issues:\n    types: [opened, edited]\n  pull_request_target:\n    types: [opened, edited]\njobs:\n  triage:\n    permissions:\n      contents: read\n      issues: write\n      pull-requests: write\n    runs-on: ubuntu-latest\n    steps:\n    - uses: MaaAssistantArknights/issue-checker@v1.14\n      with:\n        repo-token: \"${{ secrets.GITHUB_TOKEN }}\"\n        configuration-path: .github/issue-checker.yml\n        not-before: 2022-08-01T00:00:00Z\n        include-title: 0\n        sync-labels: 1\n```\n\n_Warning: Do not use triggers other than `pull_request`, `pull_request_target`, `issues` and `issue_comment`, unless you know what you are doing._\n\n_Note: This grants access to the `GITHUB_TOKEN` so the action can make calls to GitHub's rest API._\n\n#### Inputs\n\nVarious inputs are defined in [`action.yml`](action.yml) to let you configure the issue-checker:\n\n| Name | Description | Default |\n| - | - | - |\n| `repo-token` | Token to use to authorize label changes. | N/A |\n| `configuration-path` | The path to the label configuration file | N/A |\n| `sync-labels` | Whether or not to remove labels when not match | 1 |\n| `include-title` | Whether or not the title participate in matching | 0 |\n| `not-before` | Any issues prior to this timestamp will be ignored (blank to handle all issues) | N/A |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaassistantarknights%2Fissue-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaaassistantarknights%2Fissue-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaassistantarknights%2Fissue-checker/lists"}