Skip to content

Commit

Permalink
fix dashboard api for clients
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Oct 13, 2022
1 parent f13cadf commit 2ebf398
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## 1.0.10 – 2022-10-13
## 1.0.11 – 2022-10-13
### Changed
- use @nextcloud/vue v7.0.0
- improve reference widget wrapping
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description><![CDATA[GitHub integration provides a dashboard widget displaying your most important notifications
and a unified search provider for repositories, issues and pull requests. It also provides a link reference provider
to render links to issues, pull requests and comments in Talk and Text.]]></description>
<version>1.0.10</version>
<version>1.0.11</version>
<licence>agpl</licence>
<author>Julien Veyssier</author>
<namespace>Github</namespace>
Expand Down
3 changes: 3 additions & 0 deletions lib/Dashboard/GithubWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ public function load(): void {
*/
public function getItems(string $userId, ?string $since = null, int $limit = 7): array {
$notifications = $this->githubAPIService->getNotifications($this->userId, null, $since, $limit);
if (isset($notifications['error'])) {
return [];
}
$that = $this;
return array_map(static function(array $notification) use ($that) {
return $that->githubAPIService->getWidgetFromNotification($notification);
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/GithubAPIService.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private function getItemIconUrl(array $notification): string {
? ''
: $this->urlGenerator->getAbsoluteURL(
$this->urlGenerator->linkToRoute(Application::APP_ID . '.githubAPI.getAvatar', [
'githubUserName' => $repoOwnerLogin,
'githubLogin' => $repoOwnerLogin,
])
);
}
Expand Down

0 comments on commit 2ebf398

Please sign in to comment.