Skip to content

Commit

Permalink
refactor: remove pyGithub and issue submitter, remove settings for gi…
Browse files Browse the repository at this point in the history
…t token and username, remove links for irc, update all js dependencies

STARTS FAST! Avoids error when user does not have github token set and startup can hang for 10 minutes or more!

Signed-off-by: miigotu <[email protected]>
  • Loading branch information
miigotu committed Feb 17, 2024
1 parent e91b94d commit 992c9d5
Show file tree
Hide file tree
Showing 27 changed files with 228 additions and 619 deletions.
8 changes: 3 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Questions about SickChill?

To get your questions answered, please ask on the [#sickchill](http://webchat.freenode.net/?channels=sickchill) IRC channel on irc.freenode.net
To get your questions answered, please ask on the [sickchill discord](https://discord.gg/FXre9qkHwE)

# Contributing to SickChill

Expand All @@ -17,9 +17,7 @@ The goal of this guide is to provide the best way to contribute to the official

## Discussion

If you think you've found a bug please [file it in the bug tracker](#how-to-report-bugs).

Most of the SickChill development team can be found in the [#sickchill](http://webchat.freenode.net/?channels=sickchill) IRC channel on irc.freenode.net.
If you think you've found a bug please report it on [discord](https://discord.gg/FXre9qkHwE), where you will find most of the sickchill dev team.


## How to Report Bugs
Expand All @@ -28,7 +26,7 @@ Most of the SickChill development team can be found in the [#sickchill](http://w

Many bugs reported are actually issues with the user mis-understanding of how something works (there are a bit of moving parts to an ideal setup) and most of the time can be fixed by just changing some settings to fit the users needs.

If you are new to SickChill, it is usually a much better idea to ask for help first in the [SickChill IRC channel](http://webchat.freenode.net/?channels=sickchill). You will get much quicker support, and you will help avoid tying up the SickChill team with invalid bug reports.
If you are new to SickChill, it is usually a much better idea to ask for help first in the [sickchill discord](https://discord.gg/FXre9qkHwE). You will get much quicker support, and you will help avoid tying up the SickChill team with invalid bug reports.

### Try the latest version of SickChill

Expand Down
14 changes: 1 addition & 13 deletions .snyk
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
ignore:
'npm:semver:20150403':
- [email protected]:
reason: Waiting for official update
expires: '2015-12-21T06:00:27.961Z'
'npm:uglify-js:20150824':
- [email protected]:
reason: Waiting for official update
expires: '2015-12-21T06:00:27.962Z'
'npm:uglify-js:20151024':
- [email protected]:
reason: Waiting for official update
expires: '2015-12-21T06:00:27.962Z'
ignore: {}
patch: {}
version: v1
61 changes: 31 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,59 +20,60 @@
"serve": "webpack serve"
},
"devDependencies": {
"@babel/core": "^7.23.7",
"@babel/preset-env": "^7.23.7",
"@popperjs/core": "^2.11.6",
"@webpack-cli/generators": "^3.0.0",
"ava": "^6.0.1",
"babel-loader": "^9.0.0",
"bootstrap": "^5.3.1",
"bower": "^1.8.13",
"browser-env": "^3.1.0",
"copy-webpack-plugin": "^12.0.1",
"css-loader": "^6.7.1",
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@popperjs/core": "^2.11.8",
"@webpack-cli/generators": "^3.0.7",
"ava": "^6.1.1",
"babel-loader": "^9.1.3",
"bootstrap": "^5.3.2",
"bower": "^1.8.14",
"browser-env": "^3.3.0",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^6.10.0",
"eslint": "^8.56.0",
"eslint-config-xo": "^0.44.0",
"eslint-plugin-ava": "^14.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^51.0.1",
"grunt": "^1.5.2",
"grunt": "^1.6.1",
"grunt-bower-concat": "git+https://github.com/miigotu/grunt-bower-concat.git",
"grunt-bower-task": "^0.6.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^2.0.0",
"grunt-bower-task": "^0.6.2",
"grunt-cli": "^1.4.3",
"grunt-contrib-clean": "^2.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^5.0.0",
"grunt-contrib-jshint": "^3.2.0",
"grunt-contrib-sass": "^2.0.0",
"grunt-contrib-uglify": "^5.2.1",
"grunt-contrib-watch": "^1.0.0",
"grunt-contrib-uglify": "^5.2.2",
"grunt-contrib-watch": "^1.1.0",
"grunt-exec": "^3.0.0",
"grunt-po2json": "git+https://github.com/rockykitamura/grunt-po2json.git",
"html-webpack-plugin": "^5.6.0",
"jquery": "^3.2.1",
"jquery": "^3.7.1",
"load-grunt-tasks": "^5.1.0",
"lodash": "^4.17.15",
"lodash": "^4.17.21",
"mem-fs": "^4.0.0",
"mem-fs-editor": "^11.0.0",
"mini-css-extract-plugin": "^2.6.1",
"sass": "^1.69.7",
"sass-loader": "^14.0.0",
"snyk": "^1.1266.0",
"style-loader": "^3.3.1",
"stylelint": "^16.1.0",
"mini-css-extract-plugin": "^2.8.0",
"sass": "^1.71.0",
"sass-loader": "^14.1.0",
"snyk": "^1.1280.0",
"style-loader": "^3.3.4",
"stylelint": "^16.2.1",
"stylelint-config-idiomatic-order": "^10.0.0",
"toml": "^3.0.0",
"webpack": "^5.76.0",
"webpack-cli": "^5.0.0",
"webpack-dev-server": "^4.11.1",
"webpack": "^5.90.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.2",
"workbox-webpack-plugin": "^7.0.0",
"xo": "^0.57.0",
"yarn-minify": "^1.0.1"
"yarn-minify": "^1.0.1",
"yarn-upgrade-all": "^0.7.2"
},
"ava": {
"require": [
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ packages = [
"Bug Tracker" = "https://github.com/sickchill/sickchill/issues"
"News" = "https://raw.githubusercontent.com/SickChill/sickchill.github.io/master/sickchill-news/news.md"
"Discord" = "https://discord.com/invite/U8WPBdf"
"IRC" = "https://webchat.freenode.net/?channels=#sickchill"
"Donate"= "https://github.com/SickChill/SickChill/wiki/Donations"

[tool.poetry.scripts]
Expand Down Expand Up @@ -259,7 +258,6 @@ ipaddress = "^1.0.23"
jsonrpclib-pelix = "^0.4.2"
Mako = "^1.1.4"
markdown2 = "^2.4.0"
PyGithub = ">=1.54.1,<3.0.0"
pyOpenSSL = ">=20.0.1,<25.0.0"
python-dateutil = "^2.8.1"
python-twitter = "^3.5"
Expand Down
8 changes: 0 additions & 8 deletions sickchill/gui/slick/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,6 @@ inc_top.mako
background-position: -456px 0;
}

.menu-icon-irc {
background-position: -478px 0;
}

.menu-icon-changelog {
background-position: -495px 0;
}
Expand Down Expand Up @@ -1936,10 +1932,6 @@ select .selected {
background-position: -452px 0;
}

.add-client-icon-irc {
background-position: -488px 0;
}

.add-client-icon-putio {
background-position: -517px 0;
}
Expand Down
15 changes: 0 additions & 15 deletions sickchill/gui/slick/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,21 +369,6 @@ const SICKCHILL = {
}
});
});

$('#git_token').on('click', $('#git_token').select());

$('#create_access_token').on('click', () => {
notifyModal(
'<p>Copy the generated token and paste it in the token input box.</p>'
+ '<p>Provide permissions for repo:status, public_repo, write:discussion, read:discussion, user, gist, and notifications</p>'
+ '<p><a href="' + anonURL + 'https://github.com/settings/tokens/new?description=SickChill&scopes=user,gist,public_repo" target="_blank">'
+ '<input class="btn" type="button" value="Continue to Github..."></a></p>');
$('#git_token').select();
});

$('#manage_tokens').on('click', () => {
window.open(anonURL + 'https://github.com/settings/tokens', '_blank');
});
},
index() {
$('#log_dir').fileBrowser({title: _('Select log file folder location')});
Expand Down
2 changes: 1 addition & 1 deletion sickchill/gui/slick/js/core.min.js

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions sickchill/gui/slick/views/IRC.mako

This file was deleted.

11 changes: 0 additions & 11 deletions sickchill/gui/slick/views/config.mako
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,6 @@
</div>
</div>
<br/>
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
<i class="icon16-config-mirc"></i>&nbsp;&nbsp;${_('IRC Chat')}:
</div>
<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
<a href="irc://irc.freenode.net/#sickchill" rel="noreferrer">
<i>#sickchill</i> on <i>irc.freenode.net</i>
</a>
</div>
</div>
<br/>
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
<i class="fa fa-fw fa-discord" style="color: #6B8ADB"></i>${_('Discord')}:
Expand Down
75 changes: 0 additions & 75 deletions sickchill/gui/slick/views/config_general.mako
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<option value="schedule" ${selected(settings.DEFAULT_PAGE == 'schedule')}>${_('Schedule')}</option>
<option value="history" ${selected(settings.DEFAULT_PAGE == 'history')}>${_('History')}</option>
<option value="news" ${selected(settings.DEFAULT_PAGE == 'news')}>${_('News')}</option>
<option value="IRC" ${selected(settings.DEFAULT_PAGE == 'IRC')}>${_('IRC')}</option>
</select>
</div>
</div>
Expand Down Expand Up @@ -1153,80 +1152,6 @@
</fieldset>
</div>
</div>
<!-- Divider -->
<div class="config-group-divider"></div>
<!-- Github -->
<div class="row">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<div class="component-group-desc">
<h3>GitHub</h3>
<p>${_('Options for github related features.')}</p>
</div>
</div>
<div class="col-lg-9 col-md-8 col-sm-8 col-xs-12">
<fieldset class="component-group-list">
<div class="field-pair row">
<div class="col-lg-3 col-md-4 col-sm-5 col-xs-12">
<label class="component-title">${_('GitHub username')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 col-xs-12 component-desc">
<div class="row">
<div class="col-md-12">
<input type="text" name="git_username" id="git_username" value="${settings.GIT_USERNAME}" class="form-control input-sm input300" autocapitalize="off" autocomplete="no" />
</div>
</div>
<div class="row">
<div class="col-md-12">
<label for="git_username">${_('Only used for web IRC chat')}</label>
</div>
</div>
</div>
</div>
<div class="field-pair row">
<div class="col-lg-3 col-md-4 col-sm-5 col-xs-12">
<label class="component-title">${_('GitHub personal access token')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 col-xs-12 component-desc">
<div class="row">
<div class="col-md-12">
<input
type="password" name="git_token" id="git_token" value="${settings.GIT_TOKEN|hide}"
class="form-control input-sm input350" autocapitalize="off" autocomplete="no"
/>
% if not settings.GIT_TOKEN:
<input class="btn btn-inline" type="button" id="create_access_token" value="${_('Generate Token')}">
% else:
<input class="btn btn-inline" type="button" id="manage_tokens" value="${_('Manage Tokens')}">
% endif
</div>
</div>
<div class="row">
<div class="col-md-12">
<label for="git_token">${_('*** (REQUIRED FOR SUBMITTING ISSUES) ***')}</label>
</div>
</div>
<div class="row">
<div class="col-md-12">
<label for="git_token">
${_('Provide repo:status, public_repo, write:discussion, read:discussion, user, gist, and notifications')}
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<input type="submit" class="btn config_submitter" value="${_('Save Changes')}" />
</div>
</div>
</fieldset>
</div>
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion sickchill/helper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .common import episode_num, HTTP_STATUS_CODES, MEDIA_EXTENSIONS, pretty_file_size, sanitize_filename, setup_github, SUBTITLE_EXTENSIONS, try_int
from .common import episode_num, HTTP_STATUS_CODES, MEDIA_EXTENSIONS, pretty_file_size, sanitize_filename, SUBTITLE_EXTENSIONS, try_int
from .media_info import video_screen_size
Loading

0 comments on commit 992c9d5

Please sign in to comment.