Skip to content

Open all issues without selecting them - #1402

Merged
fregante merged 10 commits into
refined-github:masterfrom
ahmadassaf:feature/enable-open-all-button
Nov 14, 2018
Merged

fregante merged 10 commits into
refined-github:masterfrom
ahmadassaf:feature/enable-open-all-button

Conversation

@ahmadassaf

Copy link
Copy Markdown
Contributor

Using extensively the issues and PRs with combinations of filters, I very often come across the need to open all the filtered PRs or issues. This PR adds a new button to open either all issues if you are in the issues page or all the PRs even if you are not an owner.

Important: I have found as part of this PR a bug in the pageDetect logic for issues list and PR list and is fixed now

Related Issues:

screen shot 2018-07-11 at 4 50 26 pm
screen shot 2018-07-11 at 4 50 39 pm
screen shot 2018-07-11 at 4 56 06 pm

@ahmadassaf

Copy link
Copy Markdown
Contributor Author

As @bfred-it suggested this feature is not implemented as part of the already existing open-all-selected

fregante added 3 commits July 11, 2018 22:28
On repos without checkboxes, the button would only appear if there are 0 issues.
It's not necessary to specify PR or Issue, we don't do for the checked elements either. Also some searches might include both types.
Comment thread source/libs/page-detect.js Outdated
export const isPRFiles = () => /^pull\/\d+\/files/.test(getRepoPath());

export const isPRSearch = () => location.pathname.startsWith('/pulls');
export const isPRSearch = () => location.pathname.endsWith('/pulls');

This comment was marked as resolved.

@fregante fregante changed the title Enable to open all issues or PRs button Open all issues without selecting them Jul 11, 2018
Comment thread source/features/open-all-selected.js Outdated
if (!pageDetect.isIssueList() || select.all('.js-issue-row').length < 2) {
return;
}
const openAllButtonText = location.pathname.endsWith('/issues') ? `Open all issues` : `Open all PRs`;

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.

This was removed here 692b01b

@fregante

Copy link
Copy Markdown
Member

Great! Now it only needs a readme mention and screenshot

@ahmadassaf

Copy link
Copy Markdown
Contributor Author

on it .. shall i rename the file btw instead of open-all-selected to something more generic to describe the new functionality open-issues-and-PRs ?

@fregante

Copy link
Copy Markdown
Member

Perhaps batch-open-issues works. No need to specify PRs most of the time since they're the same. This would also need a migration in background.js

@fregante
fregante force-pushed the feature/enable-open-all-button branch from 1d79dcc to 363b133 Compare November 14, 2018 10:24
@fregante
fregante force-pushed the feature/enable-open-all-button branch from 363b133 to 14c2ddf Compare November 14, 2018 10:30
@fregante
fregante merged commit 540d07b into refined-github:master Nov 14, 2018
@fregante

Copy link
Copy Markdown
Member

Thanks for working on this @ahmadassaf! I found it instantly useful

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