{"id":13994331,"url":"https://github.com/roverdotcom/danger-jira_sync","last_synced_at":"2025-04-13T04:32:50.914Z","repository":{"id":62556674,"uuid":"136780504","full_name":"roverdotcom/danger-jira_sync","owner":"roverdotcom","description":"Connects JIRA with GitHub via Danger","archived":false,"fork":false,"pushed_at":"2020-09-24T15:02:07.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":68,"default_branch":"master","last_synced_at":"2025-03-26T21:46:10.397Z","etag":null,"topics":["danger","github","jira","jira-cloud","labels"],"latest_commit_sha":null,"homepage":null,"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/roverdotcom.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":"2018-06-10T05:00:15.000Z","updated_at":"2020-09-24T15:02:10.000Z","dependencies_parsed_at":"2022-11-03T06:00:46.896Z","dependency_job_id":null,"html_url":"https://github.com/roverdotcom/danger-jira_sync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdanger-jira_sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdanger-jira_sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdanger-jira_sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdanger-jira_sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roverdotcom","download_url":"https://codeload.github.com/roverdotcom/danger-jira_sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248664211,"owners_count":21141914,"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","github","jira","jira-cloud","labels"],"created_at":"2024-08-09T14:02:49.295Z","updated_at":"2025-04-13T04:32:50.692Z","avatar_url":"https://github.com/roverdotcom.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# danger-jira_sync\n\nJira and GitHub should be friends, and Danger brings them closer together\nwith jira_sync\n\n## Installation\n\nAdd `danger-jira_sync` to your Gemfile\n\n    gem \"danger-jira_sync\"\n\nOr, without bundler\n\n    $ gem install danger-jira_sync\n\n## Usage\n\nYou must always configure jira_sync before it can access the Jira REST API\n\n    jira_sync.configure(\n      jira_url: \"https://myjirainstance.atlassian.net\",\n      jira_username: \"test@example.com\",\n      jira_api_token: \"ABC123\",\n    )\n\nAutomatically label Pull Requests with the associated Jira issue's component names and project key\n\n    jira_sync.autolabel_pull_request(%w(DEV))\n\n## Methods\n\n### `configure(jira_url:, jira_username:, jira_api_token:)`\nConfigures the Jira Client with your credentials\n\n**Params**\n  - `jira_url [String]` - The full url to your Jira instance, e.g., \"https://myjirainstance.atlassian.net\"\n  - `jira_username [String]` - The username to use for accessing the Jira instance. Commonly, this is an email address\n  - `jira_api_token [String]` - The API key to use to access the Jira instance. Generate one here: https://id.atlassian.com/manage/api-tokens\n\n**Returns**\n - `[JIRA::Client]` - The underlying `JIRA::Client` instance\n\n### `autolabel_pull_request(issue_prefixes)`\nLabels the Pull Request with Jira Project Keys and Component Names\n\n### `autolabel_pull_request(issue_prefixes, project: true, components: true, labels: true)`\nLabels the Pull Request with Jira Project Keys, Component Names, and Labels\n\n**Params**\n  - `issue_prefixes [Array\u003cString\u003e]` - An array of issue key prefixes; this is often the project key. These must be present in the title or body of the Pull Request\n\n**Returns**\n  - `[Array\u003cString\u003e, nil]` - The list of project \u0026 component labels that were applied or nil if no issue or labels were found\n\n\n## Development\n\n1. Create a [Jira Cloud developmnet environment](http://go.atlassian.com/cloud-dev)\n2. Clone this repo\n3. Run `bundle install` to setup dependencies\n4. Copy `.env.sample` to `.env` and fill in settings for GitHub and your Jira Cloud development environment\n5. Run `bundle exec rake spec` to run the tests\n6. Use `bundle exec guard` to automatically have tests run as you make changes\n7. Make your changes\n\n# **:warning: Do not commit fixtures with your credentials in them :warning:**\n\nBefore committing, check to see if you have created or changed any fixtures in `/spec/fixtures/vcr_cassettes`. If you have, it is possible that the changed file contains your credentials. Manually remove your credentials from these fixture files\n\nWhen a new HTTP request is made that [VCR](https://github.com/vcr/vcr) hasn't seen before, it will record the response from the server and play it back in subsequent HTTP requests to the same URL with the same headers. This means that if a new request is made in the tests, it will actually make a request to the server in order to record the response. For this reason, development should be done within testing environments in GitHub and Jira Cloud\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Fdanger-jira_sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froverdotcom%2Fdanger-jira_sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Fdanger-jira_sync/lists"}