Skip to content

Hide Releases tab if there are no releases - #1339

Merged
sindresorhus merged 6 commits into
masterfrom
no-releases
Jul 10, 2018
Merged

sindresorhus merged 6 commits into
masterfrom
no-releases

Conversation

@fregante

Copy link
Copy Markdown
Member

Closes #1338


const repoUrl = pageDetect.getRepoURL();
const repoKey = `${repoUrl}-releases-count`;
const repoKey = `releases-count-${repoUrl}`;

@fregante fregante May 19, 2018 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was changed because it was stored as a string, now it's a number. It just makes it easier to deal with it.

Looking forward to see someone implement #624 😄

Comment thread source/features/add-releases-tab.js Outdated
registerShortcut('repos', 'g r', 'Go to Releases');

if (pageDetect.isReleasesOrTags()) {
if (pageDetect.isReleases()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's no isReleases()

@sindresorhus

Copy link
Copy Markdown
Member

@fregante

Copy link
Copy Markdown
Member Author

It should work now. updateReleasesCount was mistakenly returning the an element instead of a number on the repo root.

@sindresorhus
sindresorhus merged commit 7a3b3de into master Jul 10, 2018
@sindresorhus
sindresorhus deleted the no-releases branch July 10, 2018 21:33
ahmadassaf added a commit to ahmadassaf/refined-github that referenced this pull request Jul 16, 2018
* master:
  Copy Prev/Next buttons to bottom of commit page (refined-github#1389)
  Hide Releases tab if there are no releases (refined-github#1339)
  Add delete button to files in a PR  (refined-github#1398)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants