https://github.com/codeforfoco/codeforfocoissues
https://github.com/codeforfoco/codeforfocoissues
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codeforfoco/codeforfocoissues
- Owner: CodeForFoco
- License: mit
- Created: 2017-02-12T05:26:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-05T17:49:36.000Z (almost 8 years ago)
- Last Synced: 2025-01-14T17:35:46.778Z (4 months ago)
- Language: Java
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Creating Issues
## Getting Started
This small application allows the user to create a new **Issue** remotely.
The following info is required to be stored in the **src/main/webapp/WEB-INF/classes/application.properties** file:
- GitHub account name
- Repository name
- TokenThere are two ways to create a new **Issue**
1. Using a "conventional" URL
```
http://[hostname][:8080]/createIssue?issueTitle=ATitle&firstName=AFirstName&lastName=ALastName&email=AnEmail&userComment=AComment
```2. Sending a **POST** request to the following REST Endpoint:
http://\[hostname\]:\[:8080\]/issues
And the following body:
```json
{
"issueTitle":"ATitle",
"firstName":"AFirstName",
"lastName":"ALastName",
"email":"AnEmail",
"userComment":"AComment"
}
```
##
## Running the application locally1. $ mvn clean install
2. $ java -jar target/issues-swarm.jarExample using **cURL**:
```
curl -X POST \
http://127.0.0.1:8080/issues \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"issueTitle":"ATitle",
"firstName":"AFirstName",
"lastName":"ALastName",
"email":"AnEmail",
"userComment":"AComment"
}'
```Example using **jQuery**:
```javascript
var settings = {
"async": true,
"crossDomain": true,
"url": "http://127.0.0.1:8080/issues",
"method": "POST",
"headers": {
"content-type": "application/json",
"cache-control": "no-cache"
},
"processData": false,
"data": "{\n\t\"issueTitle\":\"ATitle\",\n\t\"firstName\":\"AFirstName\",\n\t\"lastName\":\"ALastName\",\n\t\"email\":\"AnEmail\",\n\t\"userComment\":\"AComment\"\n}"
}$.ajax(settings).done(function (response) {
console.log(response);
});
```
## Bugs / Feedback / SuggestionsWe encourage you to [open up an issue][newissue] if you have any feedback, suggestions or bugs.
## License
MIT, see [LICENSE](/LICENSE) for full license.
[slack]: https://codeforfoco.slack.com/
[slackinvite]: https://codeforfocoslack.herokuapp.com
[fork]: https://help.github.com/articles/fork-a-repo/
[forkthisrepo]: https://github.com/CodeForFoco/TODOUPDATEURL#fork-destination-box
[contributing]: https://github.com/CodeForFoco/org/blob/master/CONTRIBUTING.md
[githubissue]: https://github.com/CodeForFoco/TODOUPDATEURL/issues
[newissue]: https://github.com/CodeForFoco/TODOUPDATEURL/issues/new
[pullrequest]: https://github.com/CodeForFoco/TODOUPDATEURL/pulls