1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-08-06 22:13:02 +02:00

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
This commit is contained in:
Andy Grunwald
2020-05-14 17:18:31 +02:00
committed by GitHub
parent f6b1dcafcf
commit 146229d2ab
25 changed files with 239 additions and 239 deletions

View File

@ -7,9 +7,9 @@ import (
"io/ioutil"
)
// VersionService handles Versions for the JIRA instance / API.
// VersionService handles Versions for the Jira instance / API.
//
// JIRA API docs: https://docs.atlassian.com/jira/REST/latest/#api/2/version
// Jira API docs: https://docs.atlassian.com/jira/REST/latest/#api/2/version
type VersionService struct {
client *Client
}
@ -28,9 +28,9 @@ type Version struct {
StartDate string `json:"startDate,omitempty" structs:"startDate,omitempty"`
}
// GetWithContext gets version info from JIRA
// GetWithContext gets version info from Jira
//
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-version-id-get
// Jira API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-version-id-get
func (s *VersionService) GetWithContext(ctx context.Context, versionID int) (*Version, *Response, error) {
apiEndpoint := fmt.Sprintf("/rest/api/2/version/%v", versionID)
req, err := s.client.NewRequestWithContext(ctx, "GET", apiEndpoint, nil)
@ -51,9 +51,9 @@ func (s *VersionService) Get(versionID int) (*Version, *Response, error) {
return s.GetWithContext(context.Background(), versionID)
}
// CreateWithContext creates a version in JIRA.
// CreateWithContext creates a version in Jira.
//
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-version-post
// Jira API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-version-post
func (s *VersionService) CreateWithContext(ctx context.Context, version *Version) (*Version, *Response, error) {
apiEndpoint := "/rest/api/2/version"
req, err := s.client.NewRequestWithContext(ctx, "POST", apiEndpoint, version)
@ -88,7 +88,7 @@ func (s *VersionService) Create(version *Version) (*Version, *Response, error) {
// UpdateWithContext updates a version from a JSON representation.
//
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-version-id-put
// Jira API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-version-id-put
func (s *VersionService) UpdateWithContext(ctx context.Context, version *Version) (*Version, *Response, error) {
apiEndpoint := fmt.Sprintf("rest/api/2/version/%v", version.ID)
req, err := s.client.NewRequestWithContext(ctx, "PUT", apiEndpoint, version)