{"id":19511438,"url":"https://github.com/kaelaela/danger-auto_label","last_synced_at":"2025-04-26T03:32:33.045Z","repository":{"id":27789791,"uuid":"106843421","full_name":"kaelaela/danger-auto_label","owner":"kaelaela","description":"Enable to set label automatically from Danger. This is made from Danger plugin.","archived":false,"fork":false,"pushed_at":"2023-01-25T03:28:30.000Z","size":1902,"stargazers_count":17,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-17T09:52:22.630Z","etag":null,"topics":["danger","danger-plugin","ruby"],"latest_commit_sha":null,"homepage":"http://danger.systems/ruby/","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/kaelaela.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}},"created_at":"2017-10-13T15:42:37.000Z","updated_at":"2025-01-17T12:15:47.000Z","dependencies_parsed_at":"2023-02-14T04:16:03.281Z","dependency_job_id":null,"html_url":"https://github.com/kaelaela/danger-auto_label","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelaela%2Fdanger-auto_label","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelaela%2Fdanger-auto_label/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelaela%2Fdanger-auto_label/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaelaela%2Fdanger-auto_label/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaelaela","download_url":"https://codeload.github.com/kaelaela/danger-auto_label/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250926942,"owners_count":21509059,"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":["danger","danger-plugin","ruby"],"created_at":"2024-11-10T23:21:00.420Z","updated_at":"2025-04-26T03:32:31.416Z","avatar_url":"https://github.com/kaelaela.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"A [Danger](http://danger.systems/ruby/) plugin. ([RubyGems](https://rubygems.org/gems/danger-auto_label))\n\n### danger-auto_label\n\nNo more set label to issue or pull request manually.  \nExample, you can set labels simply by changing the PR title.\n\n![sample](https://github.com/kaelaela/danger-auto_label/blob/master/gif/sample.gif)\n\n### Usage\n\nVery simple usage.  \n\nFirst, install gem.\n\n```\n$ gem install danger-auto_label\n```\n\nSet wip label automatically when the PR title contains '[WIP]'.\n\n```sample.rb\n  if github.pr_title.include? \"[WIP]\"\n    auto_label.wip=(github.pr_json[\"number\"])\n  else\n    auto_label.remove(\"WIP\")\n    # If you want to delete label\n    # auto_label.delete(\"WIP\")\n  end\n```\n\n#### Methods\n\n`wip=` - Set WIP label to PR.\n\n```ruby\n# Add \"WIP\" label to this Pull Request\npr_number = github.pr_json[\"number\"]\nauto_label.wip=(pr_number) \n```\n\n`set` - Set any labels to PR by this.\n\n```ruby\n# Add \"Orange Label\" with orange color to this Pull Request\n# Note: will create label if it does not exist\npr_number = github.pr_json[\"number\"]\nauto_label.set(pr_number, \"Orange Label\", \"ff8800\") \n```\n\n`delete` - Delete any labels from repository.\n\n```ruby\n# Remove \"Orange Label\" from this Repository (use with caution!)\nauto_label.delete(\"Orange Label\") \n```\n\n`remove` - Remove any labels from PR.\n\n```ruby\n# Remove \"Orange Label\" from this Pull Request\nauto_label.remove(\"Orange Label\") \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaelaela%2Fdanger-auto_label","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaelaela%2Fdanger-auto_label","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaelaela%2Fdanger-auto_label/lists"}