-
Notifications
You must be signed in to change notification settings - Fork 123
Add call for getting attachments meta configuration #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * Gets attachment upload limit. | ||
| * | ||
| * @return array | ||
| */ |
There was a problem hiding this comment.
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.
src/Jira/Api.php
Outdated
| * | ||
| * @return array | ||
| */ | ||
| public function getAttachmentUploadLimit() |
There was a problem hiding this comment.
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); | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
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.0tag needs to be added (set how it's done for other methods)
| * @since 2.0.0 | ||
| */ | ||
| public function getAttachmentsMetaInformation() | ||
| { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
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. |
|
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? |
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:
Actually GitHub now has this feature as well, when merging PR. Let me try that. |
|
Merged, thanks @N-M . |
Option to get attachments meta configuration.