Page MenuHomePhabricator

Add dependabot change mirroring to Wikidata / Wikibase gerrit repositories
Closed, ResolvedPublic5 Estimated Story Points

Description

In T244001 we (Wikidata/Wikibase) evaluated the state of automatic and manual checking of npm audit for Wikibase projects.
A working patch was trailed with WikibaseManifest showing that this works in practice https://gerrit.wikimedia.org/r/691265
You can see the patches that have been created at https://gerrit.wikimedia.org/r/q/owner:addshorewiki%252Baddbot-dependabot%2540gmail.com

We should enable such patch mirroring by introducing an action like this to all of our Gerrit repos.
We should look at how to share the workflow between multiple repositories to avoid copy paste stuff, errors, and update pain. (Could be turning it into an action, OR sharing the workflow?)

Acceptance Criteria 🏕️🌟 (September 2021)

Event Timeline

Addshore renamed this task from Consider adding dependabot & change mirroring to Wikidata / Wikibase gerrit repositories to Add dependabot change mirroring to Wikidata / Wikibase gerrit repositories.Sep 14 2021, 10:11 AM
Addshore triaged this task as Medium priority.Sep 15 2021, 8:31 AM
Addshore updated the task description. (Show Details)
Addshore set the point value for this task to 5.

The required secret is now available to all of these repos (taken from the list of our repos on gerrit)

image.png (799×626 px, 91 KB)

Let me (or another admin of the wikimedia github org) know if more need to be added.

Change 721768 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/WikibaseManifest@master] Switch to wmde/dependabot-gerrit-action@main

https://gerrit.wikimedia.org/r/721768

So this seems to maybe possibly work now, https://github.com/wmde/dependabot-gerrit-action/ lets switch it on for WikibaseManifest and see if it works before enabling it on any other repo.

Change 721768 merged by jenkins-bot:

[mediawiki/extensions/WikibaseManifest@master] Switch to wmde/dependabot-gerrit-action@main

https://gerrit.wikimedia.org/r/721768

Moving to Verification until we’re seeing some changes arriving at WikibaseManifest (Gerrit search link), at which point we can move this back to Doing for further work (tag a stable version of the action and use it in more repositories).

I added @dependabot rebase to the 2 open PRs on the WikibaseManifest repo.
This triggered 2 runs

https://github.com/wikimedia/mediawiki-extensions-WikibaseManifest/actions/runs/1257962268
https://github.com/wikimedia/mediawiki-extensions-WikibaseManifest/actions/runs/1257962882

Looking at the output though they appear to have both pushed to the same change on Gerrit? https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseManifest/+/722625
This is due to them both having the same change-id Change-Id: I572d983330ef815dd78282463dec0df97900b789

They both start their change id generation with the same hash?
random=$(echo d629eaac3fd3fc12012f1c54bb082c39f6f32545 | git hash-object --stdin)
Which should come from
random=$(echo ${{github.sha}} | git hash-object --stdin)

So something odd is going on there or needs to change!

When trying out the sharing of the workflows i've read through this https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization#creating-a-workflow-template

Which made me create https://github.com/wmde/.github and add the template which then becomes available in the organization as a template.

image.png (303×821 px, 36 KB)

However, these are only templates and require an actual commit to the repo, so using this on the wikimedia foundation on our mirrored repos wouldn't work 😿

Will leave the wmde/.github repo around as it still might serve a purpose for some of our non mirrored repos.

Change 723054 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/Wikibase@master] Add Github actions dependabot workflow

https://gerrit.wikimedia.org/r/723054

Change 723055 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/WikibaseLexeme@master] Add Github Actions dependebot workflow

https://gerrit.wikimedia.org/r/723055

Change 723056 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/WikibaseQualityConstraints@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723056

Change 723057 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/WikimediaBadges@master] Add Github Actions dependabot workflow

https://gerrit.wikimedia.org/r/723057

Change 723059 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/Wikidata.org@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723059

Change 723061 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/ArticlePlaceholder@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723061

Change 723063 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/Cognate@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723063

Change 723144 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/PropertySuggester@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723144

Change 723145 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[mediawiki/extensions/InterwikiSorting@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723145

Change 723147 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[wikibase/javascript-api@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723147

Change 723148 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[wikibase/termbox@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723148

Change 723149 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[wikidata/query/gui@master] Add Github Actions dependabot workflow

https://gerrit.wikimedia.org/r/723149

Change 723157 had a related patch set uploaded (by Tobias Andersson; author: Tobias Andersson):

[data-values/value-view@master] Add Github Actions dependabot workflow

https://gerrit.wikimedia.org/r/723157

Change 723149 merged by jenkins-bot:

[wikidata/query/gui@master] Add Github Actions dependabot workflow

https://gerrit.wikimedia.org/r/723149

Change 723145 merged by jenkins-bot:

[mediawiki/extensions/InterwikiSorting@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723145

Change 723063 merged by jenkins-bot:

[mediawiki/extensions/Cognate@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723063

Change 723148 merged by jenkins-bot:

[wikibase/termbox@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723148

Change 723057 merged by jenkins-bot:

[mediawiki/extensions/WikimediaBadges@master] Add Github Actions dependabot workflow

https://gerrit.wikimedia.org/r/723057

Change 723059 merged by jenkins-bot:

[mediawiki/extensions/Wikidata.org@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723059

Change 723056 merged by jenkins-bot:

[mediawiki/extensions/WikibaseQualityConstraints@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723056

Change 723061 merged by jenkins-bot:

[mediawiki/extensions/ArticlePlaceholder@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723061

Change 723055 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723055

Change 723144 merged by jenkins-bot:

[mediawiki/extensions/PropertySuggester@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723144

Change 723147 merged by jenkins-bot:

[wikibase/javascript-api@master] Add Github Actions Dependabot workflow

https://gerrit.wikimedia.org/r/723147

Change 723157 merged by jenkins-bot:

[data-values/value-view@master] Add Github Actions dependabot workflow

https://gerrit.wikimedia.org/r/723157

Change 723054 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add Github actions dependabot workflow

https://gerrit.wikimedia.org/r/723054

I couldn't find a specific phab project for addbot, so linking here: https://github.com/wmde/dependabot-gerrit-action/pull/1 will *hopefully* automatically abandon closed patches