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
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>
Atlassian names the product "Jira".
In this library, the product name is used different (JIRA) and
inconsistent (sometimes JIRA, sometimes Jira).
closes issue #284
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)
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
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
* 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
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 :)
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.
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).
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.
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.
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
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.
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 '&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.