#2637 plugin hooks for repo modification
Merged by tkopecek. Opened by tkopecek.
tkopecek/koji issue2636  into  master

Download 2637.patch

Fixes: https://pagure.io/koji/issue/2636

@ktdreyer @mikem @ngompa

:thumbsup:

Fixes: https://pagure.io/koji/issue/2636

:tada:

Awesome! (I have not tested it)

Will fixes for https://pagure.io/robosignatory/issue/14 and https://pagure.io/pungi/issue/506 follow?

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

[mikem@localhost koji]$ flake8 builder/kojid
builder/kojid:5458:50: F821 undefined name 'tag'

In the postCreateDistRepo callback the repo_id value passed in might have been reset by the earlier bit of code:

        if opts.get('delta'):
            # should be a list of repo ids to delta against
            for repo_id in opts['delta']:

We should adjust that loop so that it uses its own variable.

Otherwise looks fine. Simple enough to add hooks. Hopefully this is sufficient for the plugins folks want to write.

rebased onto 88c3ffc2c2a78cecf457cff5158daee2ab2d902f

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

1 new commit added

  • rename local variable

Thanks for the updates!

tag = self.session.getTag(rinfo['tag_id'], strict=True)['name']
self.run_callbacks('postCreateRepo', tag=tag, repodir=self.outdir,
                   repo_id=self.repo_id, arch=arch)

For consistency, we should probably query the tag at the event for the repo.

rebased onto 6ad2bccec3952139ef65824ab403abcd5f4baf19

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

Commit 006f4dea fixes this pull-request

Pull-Request has been merged by tkopecek

Metadata