Skip to content

Conversation

@N-M
Copy link
Contributor

@N-M N-M commented Jun 15, 2016

Option to get attachments meta configuration.

* Gets attachment upload limit.
*
* @return array
*/
Copy link
Member

@aik099 aik099 Jun 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename into getAttachmentsMetaInformation, because according to https://docs.atlassian.com/jira/REST/latest/#api/2/attachment-getAttachmentMeta not only upload limit is returned but all attachment configuration set in given JIRA instance.

@aik099 aik099 changed the title Attachment upload limit Add call for getting attachments meta configuration Jun 15, 2016
src/Jira/Api.php Outdated
*
* @return array
*/
public function getAttachmentUploadLimit()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄 I said renaming method. Not removing 1st line of it's declaration.

return $this->api(self::REQUEST_PUT, sprintf('/rest/api/2/issue/%s', $issue_key), $params);
}

/**
Copy link
Member

@aik099 aik099 Jun 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also:

  • the short description needs to be updated to reflect method name change
  • the @since 2.0 tag needs to be added (set how it's done for other methods)

* @since 2.0.0
*/
public function getAttachmentsMetaInformation()
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the 3rd argument default value also array()? If that is so, then you can just omit it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct it is removed.

@aik099
Copy link
Member

aik099 commented Jun 15, 2016

It's kind of stupid to ask at this point, but is knowing upload limit before making API calls really helps?

Otherwise please squash and it's ready to be merged.

@N-M
Copy link
Contributor Author

N-M commented Jun 15, 2016

In my use case i need to present a user upload limit before he chooses to add ticket with attachments on Jira.

I do not see squash option how i can do it?

@aik099
Copy link
Member

aik099 commented Jun 16, 2016

I do not see squash option how i can do it?

Where do you want to see it? This is a way to combine all commits on a branch (that powers the PR) onto single commit. This is pure git feature.

In general case:

  1. run this command: git rebase -i HEAD~3 (the 3 is number of commits you want to combine)
  2. in dialog that opens select squash option for all but 1st commit
  3. change commit message to be used for final commit on next screen

Actually GitHub now has this feature as well, when merging PR. Let me try that.

@aik099 aik099 merged commit 23ed810 into console-helpers:master Jun 16, 2016
@aik099
Copy link
Member

aik099 commented Jun 16, 2016

Merged, thanks @N-M .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants