Plugins for RepoBee (the plugin category)¶
RepoBee defines a fairly simple but powerful plugin system that allows programmers to hook into certain execution points. To read more about the details of these hooks (and how to write your own plugins), see the repobee-plug Developer Documentation.
Listing available plugins (the list action)¶
The plugin list command allows you to list available plugins for RepoBee.
At the time of writing, the list is as follows:
$ repobee plugin list
╒═══════════╤════════════════════════════════════════╤═══════════════════════════════════════════════════════╤════════════════╤══════════════════════════╕
│ Name │ Description │ URL │ Latest │ Installed (√ = active) │
╞═══════════╪════════════════════════════════════════╪═══════════════════════════════════════════════════════╪════════════════╪══════════════════════════╡
│ junit4 │ Plugin for RepoBee that runs JUnit4 on │ https://github.com/repobee/repobee-junit4 │ v1.0.0-alpha.1 │ - │
│ │ cloned repos │ │ │ │
├───────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────┼────────────────┼──────────────────────────┤
│ feedback │ A RepoBee plugin for opening feedback │ https://github.com/repobee/repobee-feedback │ v0.5.0 │ - │
│ │ issues in on student issue trackers │ │ │ │
├───────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────┼────────────────┼──────────────────────────┤
│ csvgrades │ A plugin for RepoBee that parses the │ https://github.com/repobee/repobee-csvgrades │ v0.1.0 │ - │
│ │ JSON file produced by list-issues to │ │ │ │
│ │ report grades into a CSV file │ │ │ │
├───────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────┼────────────────┼──────────────────────────┤
│ sanitizer │ A plugin for sanitizing master │ https://github.com/repobee/repobee-sanitizer │ bcab711 │ - │
│ │ repositories before distribution to │ │ │ │
│ │ students │ │ │ │
├───────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────┼────────────────┼──────────────────────────┤
│ gitlab │ Makes RepoBee compatible with GitLab │ https://repobee.readthedocs.io/en/stable/plugins.html │ N/A │ 3.0.0-beta.1 │
├───────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────┼────────────────┼──────────────────────────┤
│ javac │ Runs javac on student repos after │ https://repobee.readthedocs.io/en/stable/plugins.html │ N/A │ 3.0.0-beta.1 │
│ │ cloning │ │ │ │
├───────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────┼────────────────┼──────────────────────────┤
│ pairwise │ Makes peer review allocation pairwise │ https://repobee.readthedocs.io/en/stable/plugins.html │ N/A │ 3.0.0-beta.1 │
│ │ (if student A reviews student B, then │ │ │ │
│ │ student B reviews student A) │ │ │ │
├───────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────┼────────────────┼──────────────────────────┤
│ pylint │ Runs pylint on student repos after │ https://repobee.readthedocs.io/en/stable/plugins.html │ N/A │ 3.0.0-beta.1 │
│ │ cloning │ │ │ │
├───────────┼────────────────────────────────────────┼───────────────────────────────────────────────────────┼────────────────┼──────────────────────────┤
│ query │ An experimental query command for │ https://repobee.readthedocs.io/en/stable/plugins.html │ N/A │ 3.0.0-beta.1 │
│ │ querying the hooks results file (NOTE: │ │ │ │
│ │ This plugin is not stable) │ │ │ │
╘═══════════╧════════════════════════════════════════╧═══════════════════════════════════════════════════════╧════════════════╧══════════════════════════╛
Note that the list action also shows you what version is installed, and if
it’s active. More on that later.
Installing and uninstalling plugins (the install and uninstall actions)¶
The install action allows a user to install one of our curated plugins, or
user-made plugins. To install a curated plugin, simply run repobee plugin
install, and a menu system much like the config wizard will guide you
through the install process. To upgrade a plugin, simply run the install
action again and select a newer version.
To uninstall a plugin, simply run repobee plugin uninstall. This will guide
you through the process of installing any installed plugin that you do not wish
to have anymore.
Managing installed plugins (the activate action)¶
A plugin being installed is not enough for it to actually do anything (otherwise, all of the plugins that ship with RepoBee would always do things). There are two ways to activate plugins: temporarily and persistently.
Temporary plugin activation¶
You can activate plugins temporarily for one invocation by specifying them with
the --plug|-p option to the preparser. For example, if I want to run repos
clone with the javac plugin active, I would do something like this:
$ repobee -p javac repos clone [...]
We recommend using the -p preparser option for plugins that you only want to
activate from time to time, but you don’t necessarily want them active all the
time.
Hint
You can specify the -p option multiple times to temporarily activate
multiple plugins. That is to say, type repobee -p javac -p pylint [...]
to activate both the javac and pylint plugins.
Persistent plugin activation¶
To persistently activate or deactivate a plugin, RepoBee provides an
activate action. Run repobee plugin activate, and follow the prompts to
activate your desired plugin(s). We recommend activating plugins in this fashion
if they are to be used indefinitely, such as plugins that add commands.
Note
If you use GitLab, you should most definitely run plugin activate to
activate the gitlab plugin permanently!
Plugin configuration¶
Some plugins are configurable, meaning that they read values from the
configuration file. To be able to configure a plugin with the config wizard
command, the plugin must be active. It doesn’t matter if the plugin is
temporarily or persistently activated. As an example, I can configure the
javac plugin by running the config wizard like so.
$ repobee -p javac config wizard
Plugins typically use sections other than the repobee section of the
configuration file, and you’ll find that new sections pop up in the config
wizard when certain plugins are active.