Giter VIP home page Giter VIP logo

jira_search_replace's Introduction

jira_search_replace

Search & Replace via Rest API for JIRA

This script performs search and replace across a set of issues in JIRA via JIRA's REST API. The jira_search_replace.ini file contains the URL of the JIRA instance, the JQL to specify the set of issues, issue fields to modify, and the search and replace strings.

There is a second .ini file, auth.ini, which you will need to edit to supply the username and password which will be used to execute the REST calls.

jira_search_replace's People

Contributors

chrisboyke avatar simonbru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jira_search_replace's Issues

atlassian auth has changed

Atlassian has changed the way it wants us to send authentication headers.
they want the username:apikey encoded in base64 and that gets stuffed into "authorization: basic" header.
Actually I guess this is normal-ish for basic-auth..
here is their "help" page
https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

here's how I did it and it seems to work:

auth_parts=(instance['user']+":"+instance['apikey']).encode('ascii')
auth_str=base64.b64encode(auth_parts).decode('ascii')
headers={'Authorization' : 'Basic '+auth_str,'Content-Type':'application/json'}

not being a python programmer I have just hacked this into your util.py in the "get_with_cache" and "do_post" "do_put" functions, so I'm sure you can design a more elegant way to integrate it.

TypeError: unsupported operand type(s) for +: 'int' and 'str'

Hello
I have encountered an error. Can you tell me how to fix it?
Looking forward to your reply

Traceback (most recent call last):
File "jira_search_replace.py", line 87, in
main()
File "jira_search_replace.py", line 15, in main
issues=get_issues(config)
File "jira_search_replace.py", line 27, in get_issues
data=util.do_post(config['instance'],'search',post_data)
File "/scripts/jira_search_replace/util.py", line 60, in do_post
return handle_status(url,data,r)
File "/scripts/jira_search_replace/util.py", line 85, in handle_status
log_error(url,r.status_code,r.reason,r.text,json.dumps(data,indent=2))
File "/scripts/jira_search_replace/util.py", line 14, in log_error
f.write(arg+'\n')
TypeError: unsupported operand type(s) for +: 'int' and 'str'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.