``` (setf forgerie-phabricator:*project-assignment-overrides* '((:KEY 14 :NAME "Git cloner" :ACTION :ASSIGN :REPOSITORY "swh-cloner-git") (:KEY 15 :NAME "Storage manager" :ACTION :ASSIGN :REPOSITORY "swh-storage") (:KEY 16 :NAME "Core & foundations" :ACTION :ASSIGN :REPOSITORY "swh-core") (:KEY 17 :NAME "Git loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-git") (:KEY 18 :NAME "Directory loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-core") (:KEY 19 :NAME "Development environment" :ACTION :ASSIGN :REPOSITORY "swh-environment") (:KEY 20 :NAME "Web app" :ACTION :ASSIGN :REPOSITORY "swh-web") (:KEY 21 :NAME "GitHub lister" :ACTION :ASSIGN :REPOSITORY "swh-lister") (:KEY 22 :NAME "CGit lister" :ACTION :ASSIGN :REPOSITORY "swh-lister") (:KEY 23 :NAME "Documentation" :ACTION :ASSIGN :REPOSITORY "swh-docs") (:KEY 24 :NAME "Website" :ACTION :ASSIGN :REPOSITORY "www.softwareheritage.org-gandi") (:KEY 25 :NAME "Debian loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-core") (:KEY 26 :NAME "Tarball loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-core") (:KEY 28 :NAME "Data Model" :ACTION :ASSIGN :REPOSITORY "swh-model") (:KEY 34 :NAME "Antelink loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-antelink") (:KEY 36 :NAME "Scheduling utilities" :ACTION :ASSIGN :REPOSITORY "swh-scheduler") (:KEY 37 :NAME "SVN Loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-svn") (:KEY 38 :NAME "Puppet recipes" :ACTION :ASSIGN :REPOSITORY "puppet-swh-site") (:KEY 41 :NAME "System administration" :ACTION :ASSIGN :REPOSITORY "sysadm-environment") (:KEY 42 :NAME "Core Loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-core") (:KEY 43 :NAME "Fetcher Googlecode" :ACTION :ASSIGN :REPOSITORY "swh-fetcher-googlecode") (:KEY 58 :NAME "Object storage" :ACTION :ASSIGN :REPOSITORY "swh-objstorage") (:KEY 59 :NAME "Journal" :ACTION :ASSIGN :REPOSITORY "swh-journal") (:KEY 61 :NAME "Indexer" :ACTION :ASSIGN :REPOSITORY "swh-indexer") (:KEY 66 :NAME "Mercurial loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-mercurial") (:KEY 67 :NAME "Bitbucket lister" :ACTION :ASSIGN :REPOSITORY "swh-lister") (:KEY 76 :NAME "Vault" :ACTION :ASSIGN :REPOSITORY "swh-vault") (:KEY 77 :NAME "SWORD deposit" :ACTION :ASSIGN :REPOSITORY "swh-deposit") (:KEY 78 :NAME "Deposit" :ACTION :ASSIGN :REPOSITORY "swh-deposit") (:KEY 79 :NAME "Software Heritage Archiver" :ACTION :ASSIGN :REPOSITORY "swh-objstorage") (:KEY 88 :NAME "PyPI loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-core") (:KEY 90 :NAME "Continuous Integration" :ACTION :ASSIGN :REPOSITORY "swh-jenkins-jobs") (:KEY 91 :NAME "sandbox" :ACTION :ASSIGN :REPOSITORY "swh-sandbox") (:KEY 111 :NAME "Npm Lister" :ACTION :ASSIGN :REPOSITORY "swh-lister") (:KEY 116 :NAME "Docker environment" :ACTION :ASSIGN :REPOSITORY "swh-environment") (:KEY 121 :NAME "Npm loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-core") (:KEY 124 :NAME "SWH command line interface" :ACTION :ASSIGN :REPOSITORY "swh-core") (:KEY 125 :NAME "Graph service" :ACTION :ASSIGN :REPOSITORY "swh-graph") (:KEY 128 :NAME "Datasets" :ACTION :ASSIGN :REPOSITORY "swh-dataset") (:KEY 129 :NAME "Lister" :ACTION :ASSIGN :REPOSITORY "swh-lister") (:KEY 133 :NAME "CodeMeta Generator" :ACTION :ASSIGN :REPOSITORY "codemeta-generator") (:KEY 134 :NAME "Archive search" :ACTION :ASSIGN :REPOSITORY "swh-search") (:KEY 142 :NAME "Code scanner" :ACTION :ASSIGN :REPOSITORY "swh-scanner") (:KEY 143 :NAME "Web client" :ACTION :ASSIGN :REPOSITORY "swh-web-client") (:KEY 145 :NAME "Package Loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-core") (:KEY 150 :NAME "Software Heritage filesystem" :ACTION :ASSIGN :REPOSITORY "swh-fuse") (:KEY 152 :NAME "Nixguix loader" :ACTION :ASSIGN :REPOSITORY "swh-loader-core"))) (setf forgerie-phabricator:*repository-overrides* '( (:KEY 9 :ACTION :SKIP :SHORTNAME "git-loader-test-data") (:KEY 15 :ACTION :UPDATE :DATA (:name "Credentials passwords keys etc")) (:KEY 40 :ACTION :SKIP :SHORTNAME "org-slides") (:KEY 42 :ACTION :SKIP :SHORTNAME "pg-hash") (:KEY 48 :ACTION :SKIP :SHORTNAME "swh-statistics") (:KEY 58 :ACTION :UPDATE :DATA (:name "Subversion loader")) (:KEY 60 :ACTION :UPDATE :DATA (:name "Generic VCS and Package Loader")) (:KEY 62 :ACTION :SKIP :SHORTNAME "FFEventFeed") (:KEY 65 :ACTION :SKIP :SHORTNAME "staging") (:KEY 67 :ACTION :SKIP :SHORTNAME "gsdgh") (:KEY 73 :ACTION :SKIP :SHORTNAME "python-subvertpy") (:KEY 89 :ACTION :UPDATE :DATA (:name "Manage etc resolv.conf with puppet")) (:KEY 90 :ACTION :UPDATE :DATA (:name "Icinga 2 Puppet Module")) (:KEY 102 :ACTION :UPDATE :DATA (:name "Web user interface - Django")) (:KEY 105 :ACTION :UPDATE :DATA (:name "Manage entries in the Debian debconf database with Puppet")) (:KEY 109 :ACTION :UPDATE :DATA (:name "Puppet NGINX management module")) (:KEY 111 :ACTION :SKIP :SHORTNAME "test_pger") (:KEY 114 :ACTION :SKIP :SHORTNAME "repos-git_1") ;; found through mysql (:KEY 130 :ACTION :UPDATE :DATA (:name "Hello World")) (:KEY 152 :ACTION :SKIP :SHORTNAME "swh-memory-graph") (:KEY 160 :ACTION :SKIP :SHORTNAME "ci-environment") ;; empty (:KEY 161 :ACTION :UPDATE :DATA (:name "Private Puppet Data - censored")) (:KEY 195 :ACTION :UPDATE :DATA (:name "Cassandra and replayer deploment")) (:KEY 202 :ACTION :UPDATE :DATA (:name "CodeMeta Generator - mirror")) (:KEY 204 :ACTION :SKIP :SHORTNAME "swhapguide") ;; swhap guidelines (:KEY 233 :ACTION :SKIP :SHORTNAME "test") (:KEY 236 :ACTION :SKIP :SHORTNAME "python3-django-test-migrations") (:KEY 239 :ACTION :SKIP :SHORTNAME "scrabble") (:KEY 241 :ACTION :SKIP :SHORTNAME "python-pure-sasl") (:KEY 245 :ACTION :SKIP :SHORTNAME "training-mob-programming") (:KEY 249 :ACTION :SKIP :SHORTNAME "python3-py4j") (:KEY 265 :ACTION :SKIP :SHORTNAME "django-rename-app") )) (defun migrated-from (&key type id) (let* ((type-str (cond ((string= type "paste") "P") ((string= type "diff") "D") ((string= type "task") "T"))) (full-id (format nil "~A~A" type-str id))) (format nil "~%~%----~%*Migrated from ~A ([view on Phabricator](https://forge.softwareheritage.org/~A))*" full-id full-id))) ;; (migrated-from :type "paste" :id 1) ;; (migrated-from :type "diff" :id 2) ;; (migrated-from :type "task" :id 3) ; A function that takes an argument of a forgerie-core:merge-request and ; returns a string that will be appended to the description of created merge requests. ; ; Useful to create backlinks to the previous system, or addition migration information (setf forgerie-gitlab:*merge-request-suffix* (lambda (mr) (migrated-from :type "diff" :id (forgerie-core:merge-request-id mr)))) ; A function that takes an argument of a forgerie-core:ticket and ; returns a string that will be appended to the description of created tickets (issues). ; ; Useful to create backlinks to the previous system, or addition migration information (setf forgerie-gitlab:*ticket-suffix* (lambda (ticket) (migrated-from :type "task" :id (forgerie-core:ticket-id ticket)))) (setf forgerie-gitlab:*snippet-suffix* (lambda (snippet) (migrated-from :type "paste" :id (forgerie-core:snippet-id snippet)))) ;; (funcall forgerie-gitlab:*snippet-suffix* (car *snippets*)) ;; (funcall forgerie-gitlab:*ticket-suffix* (car *tickets*)) ;; (funcall forgerie-gitlab:*merge-request-suffix* (car *merge-requests*)) (format nil "~A~A" "blah" (funcall forgerie-gitlab:*snippet-suffix* (car *snippets*))) ;; Namespace structure ;; - Group: Software Heritage ;; - repos: python projects in a flat namespace ;; - Group: Infrastructure ;; - Group: Jenkins ;; - repos: jenkins-related repos ;; - Group: Puppet ;; - repos: our own puppet repos (puppet-swh-*) ;; - Group: puppet dependencies ;; - Group: Provisioning ;; - Group: git-annex ;; - Group: Teams ;; - Group: staff ;; - Group: HR ;; - Group: Research ;; - repos: papers (setf forgerie-gitlab:*group-structure* (labels ((nested (parent subgroup) `(:name ,(getf subgroup :name) :path ,(getf subgroup :path) :parent ,(format nil "~@[~A/~]~A" (getf parent :parent) (getf parent :path)) ,@(if (getf subgroup :subgroups) `(:subgroups ,(getf subgroup :subgroups))))) (dropsubgroups (entry) `(:name ,(getf entry :name) :path ,(getf entry :path) ,@(if (getf entry :parent) `(:parent ,(getf entry :parent))))) (flatten (structure) (loop for parent in structure nconcing (cons (dropsubgroups parent) (flatten (mapcar (lambda (subgroup) (nested parent subgroup)) (getf parent :subgroups))))))) (flatten '((:name "Software Heritage" :path "modules" :subgroups ((:name "Fixture" :path "fixtures") (:name "Experiments" :path "experiments"))) (:name "Infrastructure" :path "infra" :subgroups ((:name "CI CD" :path "ci-cd" :subgroups ((:name "Debian packages" :path "debs"))) (:name "Puppet" :path "puppet" :subgroups ((:name "Dependencies" :path "3rdparty"))) (:name "Websites" :path "websites") (:name "Annex" :path "annex") (:name "Experiments" :path "experiments"))) (:name "Teams" :path "teams" :subgroups ((:name "Staff" :path "staff") (:name "System Administrators" :path "sysadmin") (:name "Interns" :path "interns") (:name "Management" :path "management") )) (:name "Research" :path "research" :subgroups ((:name "Papers" :path "papers") (:name "Experiments" :path "experiments"))))))) (defun from-cache (wdir dir id) "Read cache information from *working-directory*/