1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2024-12-04 09:42:55 +02:00
Commit Graph

528 Commits

Author SHA1 Message Date
ahmadsalimi
3017996765 Feature: Add support for Jira ServiceDesk and its organizations 2021-02-08 03:53:28 +03:30
Ahmad Salimi
5601d2bfe2
Feature: Implement delete issue link api (#341) 2021-02-06 16:09:14 +01:00
Benji Vesterby
524ede3750
Merge pull request #336 from madest92/bool-version
Fixed bool type for release version
2021-01-25 13:11:40 -08:00
Klyahin Aleksey
4a5830d453 Fixed bool type for release version 2021-01-25 20:16:14 +03:00
Andrew Hackmann
3754d5a5c6
Add Items and Custom to FieldSchema (#332)
* Add Items and Custom to FieldSchema

* removing commas. oops

* Apply suggestions from code review

Co-authored-by: Andy Grunwald <andygrunwald@gmail.com>

* formatting

Co-authored-by: Andy Grunwald <andygrunwald@gmail.com>
2021-01-09 10:02:16 +01:00
Matt Finkel
6a6c303c9a
Merge pull request #328 from fffinkel/update-travisci-go-version
Update travisci go version
2020-11-29 21:08:11 -05:00
Matt Finkel
465476156d Remove 1.12 from travis builds
Per Wes' suggestion, let's only go back three Go versions, as only the
last two are even officially supported. Update the README accordingly.
2020-11-30 00:59:29 +00:00
Matt Finkel
64663d1d47 Add Go 1.15 to supported versions 2020-11-30 00:14:29 +00:00
Matt Finkel
0d43108abb Remove tests for Go < 1.12 2020-11-30 00:13:46 +00:00
Matt Finkel
a39d6d2037
Merge pull request #303 from kernelfail/master
fix RemoteLinkStatus
2020-10-24 22:16:27 -05:00
Matt Finkel
5d5f811f4d chore(release): 1.13.0 2020-10-25 02:54:38 +00:00
Wes McNamee
36277cd7ae chore(release): 1.12.0 2020-10-25 02:29:51 +00:00
Matt Finkel
a140437bae
Merge pull request #320 from fffinkel/master
Make basic auth deprecation more clear in README
2020-09-20 15:14:32 -04:00
Matt Finkel
7bffb2aaa7 Make basic auth deprecation more clear in README
Atlassian has deprecated password-based basic authentication for users
of Atlassian Cloud, but it remains useable for users with a self-hosted
Jira. Update the README to make this more clear.

closes #317
2020-09-20 19:05:56 +00:00
Matt Finkel
72160de143
Merge pull request #319 from fffinkel/master
Add issue status change example to README
2020-09-20 13:40:20 -04:00
Matt Finkel
e8e35b673f Add issue status change example to README
closes #318
2020-09-20 17:19:05 +00:00
Matt Finkel
6be9c38b9a
Disable stale bot (#313)
Per discussion in issue #310, the stale bot is now considered a
bad user experience. Change days before stale and close to a high number
to disable it, as we cannot remove this configuration until the
integration is also removed.

Co-authored-by: Matt Finkel <mattf@ziprecruiter.com>
2020-08-16 11:48:59 +02:00
kernelfail
607c9e4b9a fix RemoteLinkStatus 2020-06-18 23:13:01 +03:00
Andy Grunwald
de60bbed3f
Update testing github action workflow to actions/cache@v2 2020-05-28 10:23:40 +02:00
Cynthia Baran
f50cb07b29
fix: removing the use of username field in searching for users (#297) 2020-05-22 09:38:17 +02:00
Andy Grunwald
146229d2ab
fix(product): Make product naming consistent, rename JIRA to Jira (#286)
Atlassian names the product "Jira".
In this library, the product name is used different (JIRA) and
inconsistent (sometimes JIRA, sometimes Jira).

closes issue #284
2020-05-14 17:18:31 +02:00
Andy Grunwald
f6b1dcafcf fix(tests): Fix TestIssueService_PostAttachment unit test 2020-05-03 17:49:10 +02:00
Andy Grunwald
ef6d633ae1 style: Fix typos
go-jira/examples/renderedfields/main.go
	Line 51: warning: "Targetting" is a misspelling of "Targeting" (misspell)

go-jira/authentication.go
	Line 169: warning: "authenticaiton" is a misspelling of "authentication" (misspell)

go-jira/issue.go
	Line 802: warning: "specifiying" is a misspelling of "specifying" (misspell)
2020-05-03 17:46:02 +02:00
Andy Grunwald
e20a3a057d style: Make code go fmt conform 2020-05-03 15:47:27 +02:00
Andy Grunwald
eaaeec5f1c
chore(test): Remove unit testing log output for success cases (#293)
During running the unit tests we see output like

=== RUN   TestIssueService_DeleteAttachment
    TestIssueService_DeleteAttachment: issue_test.go:587: Attachment deleted
    TestIssueService_DeleteAttachment: issue_test.go:592: No error

This log can be removed, because this mostly confirms the success case.
The opposite case is throwing a testing error, which is visible as well.
Hence, there is no need to log this messages durcing testing
2020-05-03 15:45:24 +02:00
Andy Grunwald
80c02828ca
feat(project): Add GitHub Actions testing workflow (#289)
GitHub actions is a workflow engine.
This testing workflow will
- keep everything inside GitHub (one platform)
- reduce dependency to an external service (TravisCI)
- introduce stricter testing (next to unit tests, staticcheck, fmt, vet)

* fix(tests): TestIssueService_GetEditMeta_Fail fails on windows due to error message checking

We check the error string in TestIssueService_GetEditMeta_Fail.
On different operting systems, this error message is different. See

- Linux: TestIssueService_GetEditMeta_Fail: metaissue_test.go:456: Error Get "http://127.0.0.1:65328/rest/api/2/issue/PROJ-9001/editmeta": dial tcp 127.0.0.1:65328: connect: connection refused
- Windows: Error Get "http://127.0.0.1:50122/rest/api/2/issue/PROJ-9001/editmeta": dial tcp 127.0.0.1:50122: connectex: No connection could be made because the target machine actively refused it.

Now we check the error type instead of the error message

* chore(tests): Support only the current + the last two versions

go-jira follows Go's Release Policy for testing.
See https://golang.org/doc/devel/release.html#policy

Related #290
2020-05-03 15:45:09 +02:00
Suhaib Mujahid
e1f4265e2b
feat(context): Add support for context package 2020-05-03 15:38:32 +02:00
Andy Grunwald
8b64c7f005
fix(issue): IssueService.Search() with a not empty JQL triggers 400 bad request (#292)
The JQL search term is escaped twice.

closes issue #291
2020-05-03 10:05:39 +02:00
Kyle Bradford
4b91cf2b13
feat(IssueService): allow empty JQL (#268) 2020-05-02 23:14:19 +02:00
Andy Grunwald
43e8242f2c
style: Fix staticcheck (static analysis) errors for this library (#283)
* style: Fix staticcheck errors for "error strings should not be capitalized (ST1005)"

staticcheck is a static analysis tool for go.
It reports several "error strings should not be capitalized (ST1005)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "printf-style function with dynamic format ... (SA1006)"

staticcheck is a static analysis tool for go.
It reports several "printf-style function with dynamic format string and no further arguments should use print-style function instead (SA1006)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "type X is unused (U1000)"

staticcheck is a static analysis tool for go.
It reports several "type X is unused (U1000)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "should use X instead (S1003 & SA6005)"

staticcheck is a static analysis tool for go.
It reports several

- should use !bytes.Contains(b, []byte(`"password":"bar"`)) instead (S1003)
- should use strings.EqualFold instead (SA6005)

messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "unnecessary use of fmt.Sprintf (S1039)"

staticcheck is a static analysis tool for go.
It report several "unnecessary use of fmt.Sprintf (S1039)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "this value of X is never used (SA4006)"

staticcheck is a static analysis tool for go.
It report several "this value of X is never used (SA4006)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "redundant return statement (S1023)"

staticcheck is a static analysis tool for go.
It report several "redundant return statement (S1023)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "possible nil pointer dereference (SA5011)"

staticcheck is a static analysis tool for go.
It report several

    file.go:Line:character: possible nil pointer dereference (SA5011)
        file.go:Line:character: this check suggests that the pointer can be nil

messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "this value of X is never used (SA4006)"

staticcheck is a static analysis tool for go.
It report several "this value of X is never used (SA4006)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280
2020-05-02 23:08:01 +02:00
Andy Grunwald
c357b61a40
feat(project): Add workflow to greet new contributors (#288)
GitHub actions is a workflow engine.
This greetings workflow will greet people who contribute the
first time to this project. Either via Pull request or
by filling an issue.
It is a nice addition :)
2020-05-02 23:07:24 +02:00
Andy Grunwald
2096b04e52
feat(project): Add cronjob to check for stale issues (#287)
GitHub actions is a workflow engine.
The stale workflow helps us to keep the issue tracker up to date.
Issues that doesn't have activity since 60 days will be marked as
stale and closed eventually.
2020-05-02 23:07:12 +02:00
Robert Bittle
a783764b52
feat(issues): Add GetEditMeta on issue
This calls the editmeta endpoint on an issue
API docs: https://docs.atlassian.com/DAC/rest/jira/6.1.html#d2e1364
2020-05-02 23:06:44 +02:00
Luke Young
1fc10e0606
feat: Add Names support on Issue struct (#278) 2020-05-02 10:43:01 +02:00
Andy Grunwald
3f966ddaaa
chore: Added go v1.14 to TravisCI (#282)
go v1.14 was released, but we don't test for it right now.

Additionally, the allowed failure for go v1.13 is removed, because this library should support this version (and it is not marked as not supported).
2020-05-02 09:31:14 +02:00
Andy Grunwald
3fd3879ae3 improvement: Add ISSUE_TEMPLATES to guide users and contributors (for bugs and feature requests) 2020-04-29 10:59:12 -07:00
Andy Grunwald
6ad1917706 improvement: Request more information in a pull request template
Makes the Pull Request template a bit more explicit.
Goals of this are:
- to guide the user more
- to make it more clear what we are asking for (e.g. what kind of tests)
- to ask for code examples (that could be used for documentation)
- to start a thought process for the contributor
- to make the maintainers work a bit easier

Addiotionally we formatted the links in the checklist a bit more
readable for a human.
2020-04-29 10:30:48 -07:00
Andy Grunwald
10b99828bc chore: Make use of the new .github meta folder for PR template
GitHub offers a .github meta folder to store things like
Pull Request or Issue templates.
We move this file into the meta folder to keep the root a bit cleaner
and only related to code and not to the VCS environment.
2020-04-29 10:30:48 -07:00
Andy Grunwald
5e5223631a feat: Extend Makefile for more source code quality targets
The Makefile contains now additional commands to support
during development and aim for a higher source code quality:

- go vet
- go fmt
- same unit tests run command like travis
- static analysis
- and a target to run all together
2020-04-29 10:29:49 -07:00
Andy Grunwald
72d53e4630 style: Adjust source code according gofmt -d -s
Adjusting source code according to the go coding guidelines
and simplify it a bit.
2020-04-29 10:27:02 -07:00
mehanizm
8c77107df3 fix: change millisecond time format
If millisecond in go time is empty
they will be not exist in result string
if using "999" in format. And jira api
will response with error in the case.

Using "000" fix the problem.

Add test for time marshaling.
2020-04-14 20:55:02 +02:00
mehanizm
f200e158b9 feat: add AddRemoteLink method
– add method AddRemoteLink to add remote links to issue

  - add test for the method

See docs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-issue-issueIdOrKey-remotelink-post
2020-04-10 09:55:04 -07:00
Dick Appel
19d3fc0aec fix: paging with load balancer going to endless loop
When used with a load balanced Jira, the SearchPages method would end
up in an endless loop. This was caused by a bug where Jira would not
handle the MaxResults=50 that is sent by defaul properly, thus retur-
ning no issues. The SearchPages method didn't check for empty results
and ended up in an endless loop.

Fixed this by
1. Pre-escaping '&maxResults' to '&amp;MaxResults'.
2. Adding a check in SearchPages to see if the issues array is empty
   before going into the endless 'for'.

Also fixed the appropriate tests.

Fixes issue #260.
2020-03-15 14:02:52 -07:00
clement
436469b62d fix(IssueService.GetWatchers): UserService.GetByAccountID support accountId params 2020-03-11 12:57:09 -07:00
Wes McNamee
a90dd878dc
docs: Link to standard-version 2020-01-24 08:33:30 -08:00
Roman Volodin
1946cac0fe feat: Implement get remote links method 2019-12-14 08:27:17 -08:00
Johan Meiring
e37cc6c689 feat: Implement issue link type DELETE 2019-12-12 14:57:35 -08:00
Johan Meiring
48a15c1044 feat: Implement issue link type PUT 2019-12-12 14:57:35 -08:00
Johan Meiring
75b9df8b01 feat: Implement issue link type POST 2019-12-12 14:57:35 -08:00
Johan Meiring
57538b926c feat: Implement issue link type GET 2019-12-12 14:57:35 -08:00