Skip to content

Commit 6311730

Browse files
committed
Merge pull request #14 from bogdal/sentry-8.x
Sentry 8.x support
2 parents 4e4a924 + aa3b499 commit 6311730

File tree

6 files changed

+30
-14
lines changed

6 files changed

+30
-14
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ python:
44
- 2.7
55
install:
66
- pip install -U pip setuptools wheel
7-
- pip install sentry==7.7.0
87
- python setup.py install
98
script:
109
- python setup.py test

README.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sentry-youtrack
22
===============
33

4-
.. image:: https://travis-ci.org/bogdal/sentry-youtrack.png?branch=master
4+
.. image:: https://travis-ci.org/bogdal/sentry-youtrack.png?branch=master
55
:target: https://travis-ci.org/bogdal/sentry-youtrack
66

77
.. image:: https://version-image.appspot.com/pypi/?name=sentry-youtrack
@@ -16,9 +16,12 @@ Install the package via ``pip``::
1616

1717
pip install sentry-youtrack
1818

19+
``sentry-youtrack >= 0.3.0`` supports **Sentry 8.x**.
20+
``sentry-youtrack < 0.3.0`` supports **Sentry 7.x**.
21+
1922
Configuration
2023
-------------
21-
Go to your project's configuration page (Projects -> [Project]) and select the YouTrack tab.
24+
Go to your project's configuration page (Projects -> [Project]) and select the YouTrack tab.
2225
Enter the required credentials and save changes. Filling out the form is a two-step process
2326
(one to fill in credentials, one to configure project).
2427

sentry_youtrack/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '0.2.7'
1+
VERSION = '0.3.0'

sentry_youtrack/static/sentry_youtrack/scripts.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,26 @@ function save_as_default(el, field, value) {
99
value: value
1010
},
1111
beforeSend: function( xhr ) {
12+
function getCookie(name) {
13+
var cookieValue = null;
14+
if (document.cookie && document.cookie != '') {
15+
var cookies = document.cookie.split(';');
16+
for (var i = 0; i < cookies.length; i++) {
17+
var cookie = jQuery.trim(cookies[i]);
18+
// Does this cookie string begin with the name we want?
19+
if (cookie.substring(0, name.length + 1) == (name + '=')) {
20+
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
21+
break;
22+
}
23+
}
24+
}
25+
return cookieValue;
26+
}
27+
xhr.setRequestHeader("X-CSRFToken", getCookie('csrf'));
1228
el.fadeOut(200);
1329
}
1430
}).done(function(data){
15-
el.find('i').removeClass('icon-share').addClass('icon-ok');
31+
el.find('i').removeClass('icon-lock').addClass('icon-checkmark');
1632
el.fadeIn(200);
1733
});
1834
}
@@ -23,9 +39,9 @@ function init_action_buttons(container) {
2339
.attr('type', 'button')
2440
.attr('title', SAVE_AS_DEFAULT_BUTTON_MSG)
2541
.attr('data-placement', 'right')
26-
.addClass('btn-link')
42+
.addClass('btn-link btn-sm')
2743
.addClass('save-as-default')
28-
.html($('<i>').addClass('icon-share'));
44+
.html($('<i>').addClass('icon-lock'));
2945
$(this).after(action_button);
3046
});
3147
$('button[title]').tooltip();

sentry_youtrack/templates/sentry_youtrack/create_issue_form.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
{% block title %}{{ title }} | {{ block.super }}{% endblock %}
66

7-
{% block inner %}
8-
<div class="span12">
7+
{% block main %}
98
<div class="page-header">
109
<h3>{{ title }}</h3>
1110
</div>
@@ -20,20 +19,19 @@ <h3>{{ title }}</h3>
2019
</div>
2120
{% endif %}
2221

23-
24-
<form id='create-issue' class="form-horizontal" action="" method="post">
22+
<form id='create-issue' class="form-stacked" action="" method="post">
2523
{% csrf_token %}
2624
<input type="hidden" name="next" value="{{ next }}" />
2725
<div class="form-fields">
2826
{{ form|crispy }}
29-
<p class="actions">
27+
<p class="form-actions">
3028
{% block submit_button %}
3129
<button type="submit" class="btn btn-primary">{% trans "Create issue" %}</button>
3230
{% endblock %}
31+
<a href="{{ group.get_absolute_url }}" class="btn btn-default">{% trans "Cancel" %}</a>
3332
</p>
3433
</div>
3534
</form>
36-
</div>
3735
{% endblock %}
3836

3937
{% block meta %}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def run_tests(self):
3939
license='BSD',
4040
packages=find_packages(),
4141
install_requires=[
42-
'sentry>=6.1.0',
42+
'sentry>=8.0.0',
4343
],
4444
include_package_data=True,
4545
zip_safe=False,

0 commit comments

Comments
 (0)