Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.
however, insignificant breaking changes do not guarantee a major version bump, see the reasoning [here](https://github.com/kyb3r/modmail/issues/319). If you're a plugins developer, note the "BREAKING" section.


# v3.5.0dev3
# v3.5.0dev4

### Added

- A confirmation when you manually delete a thread message embed.
- Config var `enable_eval` defaults true, set `enable_eval=no` to disable the eval command. (GH #2803)
- Added `?plugins reset` command to completely reset everything related to plugins. This will fix some problems caused by broken plugins in the file system.
- Support private GitHub repos for plugins (thanks to @officialpiyush pr#2767)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.5.0-dev3"
__version__ = "3.5.0-dev4"


import asyncio
Expand Down
8 changes: 6 additions & 2 deletions cogs/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ async def download_plugin(self, plugin, force=False):
if plugin.cache_path.exists() and not force:
plugin_io = plugin.cache_path.open("rb")
logger.debug("Loading cached %s.", plugin.cache_path)

else:
async with self.bot.session.get(plugin.url) as resp:
headers = {}
github_token = self.bot.config.get("github_token")
if github_token is not None:
headers["Authorization"] = f"token {github_token}"

async with self.bot.session.get(plugin.url, headers=headers) as resp:
logger.debug("Downloading %s.", plugin.url)
raw = await resp.read()
plugin_io = io.BytesIO(raw)
Expand Down
2 changes: 2 additions & 0 deletions core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ class ConfigManager:
"token": None,
"enable_plugins": True,
"enable_eval": False,
# github access token for private repositories
"github_token": None,
# Logging
"log_level": "INFO",
}
Expand Down