On Wed, Jul 15, 2026 at 03:38:47PM -0300, Fabiano Rosas wrote:
> Daniel P. Berrangé <[email protected]> writes:
> 
> > It is desirable to be able to discover the GitLab account handle
> > assocaited with a real name in the MAINTAINERS file.
> >
> > Rather that duplicating the same account handle multiple times,
> > inline with the MAINTAINERS file entries, this introduces mapping
> > files:
> >
> >   * .gitlab-map-auto - data automatically queried from GitLab
> >     using the 'glab' tool and REST API
> >   * .gitlab-map-manual - manual overrides/augmentation for
> >     cases where the MAINTAINERS real name does not match the
> >     GitLab account real name
> >
> > The former would need refreshing when we add new MAINTAINERS
> > entries, if the person had to be added as a GitLab account
> > member. For this purpose scripts/gitlab-map-update can be
> > used, assuming the user has the 'glab' client tool present
> > and configured with an access token.
> >
> > To audit how many maintainers have GitLab handles present/missing
> > scripts/gitlab-map-check can run a report.
> >
> >   $ ./scripts/gitlab-map-check
> >   Missing GitLab handle for maintainer 'Akihiko Odaki'
> >   Missing GitLab handle for maintainer 'Albert Esteve'
> >   ....
> >   Missing GitLab handle for maintainer 'Zhenzhong Duan'
> >   Missing GitLab handle for maintainer 'Zhuoying Cai'
> >   GitLab handles missing: 158 / present: 68
> >
> > Signed-off-by: Daniel P. Berrangé <[email protected]>


> > +# the GitLab account real name. As such...
> > +
> > +# ...all gitlab handles in .gitlab-map-manual must also exist
> > +# in .gitlab-map-auto and ....
> > +for HANDLE in $(grep -v '^#' .gitlab-map-manual | awk '{print $1}')
> > +do
> > +    grep -E "^$HANDLE\s" .gitlab-map-auto >/dev/null
> > +    if test $? != 0
> > +    then
> > +   echo "Unexpected GitLab handle '$HANDLE' is not a member"
> > +    fi
> > +done
> > +
> > +# ...and all realnames in .gitlab-map-manual must also
> > +# exist in MAINTAINERS
> > +grep -v '^#' .gitlab-map-manual | \
> > +awk '{ saved = $1; $1 = ""; print substr($0, 2) }' | \
> 
> Is 'saved' doing anything here?

No, it is left over cruft after my experiments with
getting the right logic.


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Reply via email to