Skip to content

Commit 02e864f

Browse files
author
Chris Moultrie
committed
Revert "Merge branch 'master' of git://github.com/andreacode/node-jira into merging"
This reverts commit fc2806b, reversing changes made to 7011868.
1 parent fc2806b commit 02e864f

File tree

3 files changed

+1
-110
lines changed

3 files changed

+1
-110
lines changed

lib/jira.js

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@
112112
// * _0.0.3 Added APIs and Docco documentation_
113113
// * _0.0.2 Initial version_
114114
var url = require('url'),
115-
FormData = require('form-data'),
116-
fs = require('fs'),
117115
logger = console;
118116

119117

@@ -869,23 +867,14 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
869867
});
870868
};
871869

872-
<<<<<<< HEAD
873870
// ## List Components ##
874871
// ### Takes ###
875872
//
876873
// * project: key for the project
877-
=======
878-
// ## Assign issue in Jira ##
879-
// ### Takes ###
880-
//
881-
// * issueId: the Id of the issue to delete
882-
// * issueUpdate: username of the assignee
883-
>>>>>>> bbae5ff8ea8893449ee2d00000eb91dde4860dfc
884874
// * callback: for when it's done
885875
//
886876
// ### Returns ###
887877
// * error string
888-
<<<<<<< HEAD
889878
// * array of components
890879
//
891880
// [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id290489)
@@ -921,28 +910,12 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
921910
};
922911

923912
this.request(options, function(error, response, body) {
924-
=======
925-
// * success string
926-
//
927-
// [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#idp1342720)
928-
this.assign = function(issueNum, assignee, callback) {
929-
var options = {
930-
rejectUnauthorized: this.strictSSL,
931-
uri: this.makeUri('/issue/' + issueNum + '/assignee'),
932-
json: {name: assignee},
933-
method: 'PUT',
934-
followAllRedirects: true
935-
};
936-
937-
this.request(options, function(error, response) {
938-
>>>>>>> bbae5ff8ea8893449ee2d00000eb91dde4860dfc
939913

940914
if (error) {
941915
callback(error, null);
942916
return;
943917
}
944918

945-
<<<<<<< HEAD
946919
if (response.statusCode === 200) {
947920
callback(null, body);
948921
return;
@@ -1054,14 +1027,6 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
10541027
}
10551028

10561029
callback(response.statusCode + ': Error while updating');
1057-
=======
1058-
if (response.statusCode === 204) {
1059-
callback(null, "Success");
1060-
return;
1061-
}
1062-
1063-
callback(response.statusCode + ': Error while assigning');
1064-
>>>>>>> bbae5ff8ea8893449ee2d00000eb91dde4860dfc
10651030

10661031
});
10671032
};
@@ -1181,61 +1146,6 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
11811146
});
11821147
};
11831148

1184-
<<<<<<< HEAD
1185-
=======
1186-
// ## Add attachment to issue ##
1187-
// ### Takes ###
1188-
//
1189-
// * issueId: the Id of the issue to delete
1190-
// * path: local path to the attachment
1191-
// * callback: for when it's done
1192-
//
1193-
// ### Returns ###
1194-
// * error string
1195-
// * success string
1196-
//
1197-
// [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#idp2051136)
1198-
this.attachToIssue = function(issueNum, path, callback) {
1199-
var self = this;
1200-
var options = {
1201-
rejectUnauthorized: this.strictSSL,
1202-
uri: this.makeUri('/issue/' + issueNum + '/attachments'),
1203-
method: 'POST',
1204-
followAllRedirects: true,
1205-
json: true,
1206-
headers: {
1207-
'x-atlassian-token': 'nocheck'
1208-
}
1209-
};
1210-
1211-
var form = new FormData();
1212-
form.append('file', fs.createReadStream(path));
1213-
1214-
form.getLength(function(err, length) {
1215-
1216-
var form_request = self.request(options, function(error, response) {
1217-
if (error) {
1218-
callback(error, null);
1219-
return;
1220-
}
1221-
1222-
if (response.statusCode === 200) {
1223-
callback(null, "Success");
1224-
return;
1225-
}
1226-
1227-
callback(response.statusCode + ': Error while uploading');
1228-
1229-
});
1230-
1231-
form_request.setHeader('Content-Length', length);
1232-
form = form_request.form();
1233-
form.append('file', fs.createReadStream(path));
1234-
});
1235-
1236-
};
1237-
1238-
>>>>>>> bbae5ff8ea8893449ee2d00000eb91dde4860dfc
12391149
// ## List all Viewable Projects ##
12401150
// ### Takes ###
12411151
//

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
}
2323
],
2424
"dependencies": {
25-
"request": "<2.16.0",
26-
"form-data": "0.0.10"
25+
"request": "<2.16.0"
2726
},
2827
"scripts": {
2928
"test": "grunt test"

spec/jira.spec.coffee

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -364,24 +364,6 @@ describe "Node Jira Tests", ->
364364
@jira.request.mostRecentCall.args[1] null, statusCode:200
365365
expect(@cb).toHaveBeenCalledWith null, 'Success'
366366

367-
it "Assigns an Issue", ->
368-
options =
369-
rejectUnauthorized: true
370-
uri: makeUrl "issue/1/assignee"
371-
json: {name: 'newAssignee'}
372-
method: 'PUT'
373-
followAllRedirects: true
374-
375-
@jira.assign 1, 'newAssignee', @cb
376-
expect(@jira.request).toHaveBeenCalledWith options, jasmine.any(Function)
377-
378-
@jira.request.mostRecentCall.args[1] null, statusCode:400
379-
expect(@cb).toHaveBeenCalledWith '400: Error while assigning'
380-
381-
# Successful Request
382-
@jira.request.mostRecentCall.args[1] null, statusCode:204
383-
expect(@cb).toHaveBeenCalledWith null, 'Success'
384-
385367
it "Lists Transitions", ->
386368
options =
387369
rejectUnauthorized: true

0 commit comments

Comments
 (0)