New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create possiblity to add an preaction #186

Open
wants to merge 1 commit into
base: stretch-unstable
from

Conversation

Projects
None yet
1 participant
@Josue-T
Copy link
Contributor

Josue-T commented Dec 12, 2018

Problem

I need to be able to do some action before to call the main action in the moulinette.

It's used by the PR : YunoHost/yunohost#599

Solution

Add a generic concept of action which can be called before the main action.

The actionmap is used to define what will be do. By example :

    preaction:
        yunohost.preactions.checkmigrations:
            - main

Mean that the module function main from the module yunohost.preactions.checkmigrations will be executed.

The function main have two arguments:

  • The first argument is the function name of the Yunohost operation which will be done.
  • The second will a dictionnary of the argument passed to the Yunohost operation.

@Josue-T Josue-T requested review from Psycojoker , JimboJoe , zamentur , alexAubin and YunoHost/core-dev Dec 12, 2018

@Josue-T Josue-T referenced this pull request Dec 12, 2018

Open

Group permission #585

5 of 14 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment