Want to quickly get started working with Sync2Jira? Follow these steps:
First open up
fedmsg.d/sync2jira.py- Enter your GitHub token which you can get here
'github_token': 'YOUR_TOKEN',
Enter relevant JIRA information. PAT (default): use
basic_auth. OAuth 2.0: setauth_methodto'oauth2'and provideoauth2.client_idandoauth2.client_secret(see :doc:`config-file` for full options).'default_jira_instance': 'example', 'jira_username': 'your-bot-account', # optional, for duplicate detection 'jira': { 'example': { 'options': { 'server': 'https://some_jira_server_somewhere.com', 'verify': True, }, 'auth_method': 'pat', 'basic_auth': ('your-email@example.com', 'YOUR_API_TOKEN'), }, },
For OAuth 2.0 (e.g. Atlassian service account), use instead:
'example': { 'options': { 'server': 'https://your-domain.atlassian.net', 'verify': True, }, 'auth_method': 'oauth2', 'oauth2': { 'client_id': 'YOUR_CLIENT_ID', 'client_secret': 'YOUR_CLIENT_SECRET', }, },
Note
You might have to set verify to False
- Add your upstream repos to the map section
'map': { 'github': { 'GITHUB_USERNAME/Demo_project': {'project': 'FACTORY', 'component': 'gitbz', 'issue_updates': [...], 'sync': [..]}, }, },
Note
You can learn more about what can go into the issue_updates list here
- Finally you can tweak the config files optional settings to your liking
# Admins to be cc'd in duplicate emails 'admins': ['demo_jira_username'], # Scrape sources at startup 'initialize': True, # Don't actually make changes to JIRA... 'testing': True, 'filters': { 'github': { # Only sync multi-type tickets from bodhi. 'fedora-infra/bodhi': {'state': 'open', 'milestone': 4, }, }, }
- Now that you're done with the config file you can install sync2jira and run
python setup.py install >> .... >> Finished processing dependencies for sync2jira==1.7 sync2jira
Note
You might have to add config['validate_signatures'] = False. You can find out more under the main.