moodlehq / moodle-plugin-release

Template for GitHub Actions YAML file allowing to automatically release tagged version in the Moodle Plugins directory
GNU General Public License v3.0
13 stars 4 forks source link

forgot to update "PLUGIN" #7

Closed rschrenk closed 3 years ago

rschrenk commented 3 years ago

Hello,

I used this extremely cool workflow with one of my plugins, and then I copied the workflow-script to another plugin. I forgot to update the PLUGIN-name in the workflow.yml, so the sourcecode of a completely different plugin was pushed as new version to the first plugin.

In the moodle plugins database I was able to hide this wrong version, but I can not delete it.

Is there any possibility to delete a version that was published in the moodle plugins db?

Kind regards

mudrd8mz commented 3 years ago

Thank you @rschrenk

Can you please provide me with details of which plugin and which version was this? I'll try to fix it to avoid this kind of mistakes in the future.

rschrenk commented 3 years ago

@mudrd8mz It is filter_h5p, which now has a version of mod_confman in it. Thank you very much and sorry for my mistake.

mudrd8mz commented 3 years ago

and sorry for my mistake

No need to apologise. The plugins directory should not allow to do that in the first place. I am actually surprised to see it happening. Let me check.

mudrd8mz commented 3 years ago

I have a fix waiting to be deployed. In case of mismatch between version.php and the PLUGIN value, the web service call will fail with something like

"Unable to add a new version - validation errors ([\"Component declared in version.php file: <b>local_foobar<\\/b>
does not match the expected component: <b>mod_subcourse<\\/b>\"

To be deployed today.

mudrd8mz commented 3 years ago

This should be fixed now. The server side validation in the plugins directory should not allow to add a mismatching package as a new version.