invenio-vcs 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. invenio_vcs-0.0.1/.git-blame-ignore-revs +1 -0
  2. invenio_vcs-0.0.1/AUTHORS.rst +21 -0
  3. invenio_vcs-0.0.1/CHANGES.rst +14 -0
  4. invenio_vcs-0.0.1/CONTRIBUTING.rst +118 -0
  5. invenio_vcs-0.0.1/INSTALL.rst +2 -0
  6. invenio_vcs-0.0.1/LICENSE +22 -0
  7. invenio_vcs-0.0.1/MAINTAINERS +2 -0
  8. invenio_vcs-0.0.1/MANIFEST.in +41 -0
  9. invenio_vcs-0.0.1/PKG-INFO +112 -0
  10. invenio_vcs-0.0.1/README.rst +39 -0
  11. invenio_vcs-0.0.1/babel.ini +14 -0
  12. invenio_vcs-0.0.1/constraints-pypi.txt +1 -0
  13. invenio_vcs-0.0.1/invenio_vcs/__init__.py +14 -0
  14. invenio_vcs-0.0.1/invenio_vcs/alembic/1754318294_switch_to_generic_git_services.py +131 -0
  15. invenio_vcs-0.0.1/invenio_vcs/alembic/6abc1c58775e_create_vcs_branch.py +38 -0
  16. invenio_vcs-0.0.1/invenio_vcs/api.py +185 -0
  17. invenio_vcs-0.0.1/invenio_vcs/assets/semantic-ui/js/invenio_vcs/index.js +218 -0
  18. invenio_vcs-0.0.1/invenio_vcs/config.py +106 -0
  19. invenio_vcs-0.0.1/invenio_vcs/contrib/github.py +481 -0
  20. invenio_vcs-0.0.1/invenio_vcs/contrib/gitlab.py +480 -0
  21. invenio_vcs-0.0.1/invenio_vcs/errors.py +176 -0
  22. invenio_vcs-0.0.1/invenio_vcs/ext.py +121 -0
  23. invenio_vcs-0.0.1/invenio_vcs/generic_models.py +147 -0
  24. invenio_vcs-0.0.1/invenio_vcs/jobs.py +107 -0
  25. invenio_vcs-0.0.1/invenio_vcs/models.py +315 -0
  26. invenio_vcs-0.0.1/invenio_vcs/notifications/__init__.py +8 -0
  27. invenio_vcs-0.0.1/invenio_vcs/notifications/generators.py +60 -0
  28. invenio_vcs-0.0.1/invenio_vcs/oauth/handlers.py +92 -0
  29. invenio_vcs-0.0.1/invenio_vcs/providers.py +502 -0
  30. invenio_vcs-0.0.1/invenio_vcs/proxies.py +13 -0
  31. invenio_vcs-0.0.1/invenio_vcs/receivers.py +109 -0
  32. invenio_vcs-0.0.1/invenio_vcs/service.py +448 -0
  33. invenio_vcs-0.0.1/invenio_vcs/tasks.py +204 -0
  34. invenio_vcs-0.0.1/invenio_vcs/templates/semantic-ui/invenio_vcs/base.html +19 -0
  35. invenio_vcs-0.0.1/invenio_vcs/templates/semantic-ui/invenio_vcs/settings/base.html +14 -0
  36. invenio_vcs-0.0.1/invenio_vcs/templates/semantic-ui/invenio_vcs/settings/helpers.html +91 -0
  37. invenio_vcs-0.0.1/invenio_vcs/templates/semantic-ui/invenio_vcs/settings/index.html +170 -0
  38. invenio_vcs-0.0.1/invenio_vcs/templates/semantic-ui/invenio_vcs/settings/index_item.html +56 -0
  39. invenio_vcs-0.0.1/invenio_vcs/templates/semantic-ui/invenio_vcs/settings/release_item.html +202 -0
  40. invenio_vcs-0.0.1/invenio_vcs/templates/semantic-ui/invenio_vcs/settings/repo_switch.html +26 -0
  41. invenio_vcs-0.0.1/invenio_vcs/templates/semantic-ui/invenio_vcs/settings/view.html +148 -0
  42. invenio_vcs-0.0.1/invenio_vcs/translations/cs/LC_MESSAGES/messages.mo +0 -0
  43. invenio_vcs-0.0.1/invenio_vcs/translations/cs/LC_MESSAGES/messages.po +54 -0
  44. invenio_vcs-0.0.1/invenio_vcs/translations/da/LC_MESSAGES/messages.mo +0 -0
  45. invenio_vcs-0.0.1/invenio_vcs/translations/da/LC_MESSAGES/messages.po +53 -0
  46. invenio_vcs-0.0.1/invenio_vcs/translations/de/LC_MESSAGES/messages.mo +0 -0
  47. invenio_vcs-0.0.1/invenio_vcs/translations/de/LC_MESSAGES/messages.po +53 -0
  48. invenio_vcs-0.0.1/invenio_vcs/translations/en/LC_MESSAGES/messages.mo +0 -0
  49. invenio_vcs-0.0.1/invenio_vcs/translations/en/LC_MESSAGES/messages.po +86 -0
  50. invenio_vcs-0.0.1/invenio_vcs/translations/es/LC_MESSAGES/messages.mo +0 -0
  51. invenio_vcs-0.0.1/invenio_vcs/translations/es/LC_MESSAGES/messages.po +53 -0
  52. invenio_vcs-0.0.1/invenio_vcs/translations/fr/LC_MESSAGES/messages.mo +0 -0
  53. invenio_vcs-0.0.1/invenio_vcs/translations/fr/LC_MESSAGES/messages.po +56 -0
  54. invenio_vcs-0.0.1/invenio_vcs/translations/it/LC_MESSAGES/messages.mo +0 -0
  55. invenio_vcs-0.0.1/invenio_vcs/translations/it/LC_MESSAGES/messages.po +56 -0
  56. invenio_vcs-0.0.1/invenio_vcs/translations/messages.pot +280 -0
  57. invenio_vcs-0.0.1/invenio_vcs/upgrade_scripts/__init__.py +7 -0
  58. invenio_vcs-0.0.1/invenio_vcs/upgrade_scripts/migrate_github_to_vcs.py +313 -0
  59. invenio_vcs-0.0.1/invenio_vcs/utils.py +46 -0
  60. invenio_vcs-0.0.1/invenio_vcs/views/__init__.py +8 -0
  61. invenio_vcs-0.0.1/invenio_vcs/views/badge.py +52 -0
  62. invenio_vcs-0.0.1/invenio_vcs/views/vcs.py +221 -0
  63. invenio_vcs-0.0.1/invenio_vcs/webpack.py +24 -0
  64. invenio_vcs-0.0.1/invenio_vcs.egg-info/PKG-INFO +112 -0
  65. invenio_vcs-0.0.1/invenio_vcs.egg-info/SOURCES.txt +75 -0
  66. invenio_vcs-0.0.1/invenio_vcs.egg-info/dependency_links.txt +1 -0
  67. invenio_vcs-0.0.1/invenio_vcs.egg-info/entry_points.txt +36 -0
  68. invenio_vcs-0.0.1/invenio_vcs.egg-info/not-zip-safe +1 -0
  69. invenio_vcs-0.0.1/invenio_vcs.egg-info/requires.txt +46 -0
  70. invenio_vcs-0.0.1/invenio_vcs.egg-info/top_level.txt +1 -0
  71. invenio_vcs-0.0.1/pyproject.toml +3 -0
  72. invenio_vcs-0.0.1/requirements-devel.txt +7 -0
  73. invenio_vcs-0.0.1/run-i18n-tests.sh +12 -0
  74. invenio_vcs-0.0.1/run-tests.sh +61 -0
  75. invenio_vcs-0.0.1/setup.cfg +137 -0
  76. invenio_vcs-0.0.1/setup.py +14 -0
@@ -0,0 +1 @@
1
+ f5b70c3baf40f9549ecc64a616f8d0aa8710a976
@@ -0,0 +1,21 @@
1
+ ..
2
+ This file is part of Invenio-VCS.
3
+ Copyright (C) 2016-2026 CERN.
4
+
5
+ Invenio-VCS is free software; you can redistribute it and/or modify
6
+ it under the terms of the MIT License; see LICENSE file for more details.
7
+
8
+ Authors
9
+ =======
10
+
11
+ Invenio module that adds VCS integration to the platform.
12
+
13
+ - Adrian Pawel Baran <adrian.pawel.baran@cern.ch>
14
+ - Alexander Ioannidis <a.ioannidis@cern.ch>
15
+ - Amit Kapadia <akapad@gmail.com>
16
+ - Charlie Lewis <clewis@iqt.org>
17
+ - Dan Blanchard <dan.blanchard@gmail.com>
18
+ - Jiri Kuncar <jiri.kuncar@cern.ch>
19
+ - Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
20
+ - Tibor Simko <tibor.simko@cern.ch>
21
+ - Pal Kerecsenyi <pal.kerecsenyi@cern.ch>
@@ -0,0 +1,14 @@
1
+ ..
2
+ This file is part of Invenio-VCS.
3
+ Copyright (C) 2016-2026 CERN.
4
+ Copyright (C) 2024-2026 Graz University of Technology.
5
+
6
+ Invenio-VCS is free software; you can redistribute it and/or modify
7
+ it under the terms of the MIT License; see LICENSE file for more details.
8
+
9
+ Changes
10
+ =======
11
+
12
+ Version 0.0.1 (release 2026-04-01)
13
+
14
+ - initial release
@@ -0,0 +1,118 @@
1
+ Contributing
2
+ ============
3
+
4
+ Contributions are welcome, and they are greatly appreciated! Every
5
+ little bit helps, and credit will always be given.
6
+
7
+ Types of Contributions
8
+ ----------------------
9
+
10
+ Report Bugs
11
+ ~~~~~~~~~~~
12
+
13
+ Report bugs at https://github.com/inveniosoftware/invenio-vcs/issues.
14
+
15
+ If you are reporting a bug, please include:
16
+
17
+ * Your operating system name and version.
18
+ * Any details about your local setup that might be helpful in troubleshooting.
19
+ * Detailed steps to reproduce the bug.
20
+
21
+ Fix Bugs
22
+ ~~~~~~~~
23
+
24
+ Look through the GitHub issues for bugs. Anything tagged with "bug"
25
+ is open to whoever wants to implement it.
26
+
27
+ Implement Features
28
+ ~~~~~~~~~~~~~~~~~~
29
+
30
+ Look through the GitHub issues for features. Anything tagged with "feature"
31
+ is open to whoever wants to implement it.
32
+
33
+ Write Documentation
34
+ ~~~~~~~~~~~~~~~~~~~
35
+
36
+ Invenio-VCS could always use more documentation, whether as part of the
37
+ official Invenio-GitHub docs, in docstrings, or even on the web in blog posts,
38
+ articles, and such.
39
+
40
+ Submit Feedback
41
+ ~~~~~~~~~~~~~~~
42
+
43
+ The best way to send feedback is to file an issue at
44
+ https://github.com/inveniosoftware/invenio-vcs/issues.
45
+
46
+ If you are proposing a feature:
47
+
48
+ * Explain in detail how it would work.
49
+ * Keep the scope as narrow as possible, to make it easier to implement.
50
+ * Remember that this is a volunteer-driven project, and that contributions
51
+ are welcome :)
52
+
53
+ Get Started!
54
+ ------------
55
+
56
+ Ready to contribute? Here's how to set up `invenio-vcs` for local development.
57
+
58
+ 1. Fork the `invenio` repo on GitHub.
59
+ 2. Clone your fork locally:
60
+
61
+ .. code-block:: console
62
+
63
+ $ git clone git@github.com:your_name_here/invenio-vcs.git
64
+
65
+ 3. Install your local copy into a virtualenv. Assuming you have
66
+ virtualenvwrapper installed, this is how you set up your fork for local
67
+ development:
68
+
69
+ .. code-block:: console
70
+
71
+ $ mkvirtualenv invenio-vcs
72
+ $ cd invenio-vcs/
73
+ $ pip install -e .[all]
74
+
75
+ 4. Create a branch for local development:
76
+
77
+ .. code-block:: console
78
+
79
+ $ git checkout -b name-of-your-bugfix-or-feature
80
+
81
+ Now you can make your changes locally.
82
+
83
+ 5. When you're done making changes, check that your changes pass tests:
84
+
85
+ .. code-block:: console
86
+
87
+ $ ./run-tests.sh
88
+
89
+ The tests will provide you with test coverage and also check PEP8
90
+ (code style), PEP257 (documentation), flake8 as well as build the Sphinx
91
+ documentation and run doctests.
92
+
93
+ 6. Commit your changes and push your branch to GitHub:
94
+
95
+ .. code-block:: console
96
+
97
+ $ git add .
98
+ $ git commit -s
99
+ -m "component: title without verbs"
100
+ -m "* NEW Adds your new feature."
101
+ -m "* FIX Fixes an existing issue."
102
+ -m "* BETTER Improves and existing feature."
103
+ -m "* Changes something that should not be visible in release notes"
104
+ $ git push origin name-of-your-bugfix-or-feature
105
+
106
+ 7. Submit a pull request through the GitHub website.
107
+
108
+ Pull Request Guidelines
109
+ -----------------------
110
+
111
+ Before you submit a pull request, check that it meets these guidelines:
112
+
113
+ 1. The pull request should include tests and must not decrease test coverage.
114
+ 2. If the pull request adds functionality, the docs should be updated. Put
115
+ your new functionality into a function with a docstring.
116
+ 3. The pull request should work for Python 2.7, 3.3, 3.4 and 3.5. Check
117
+ https://travis-ci.org/inveniosoftware/invenio-vcs/pull_requests
118
+ and make sure that the tests pass for all supported Python versions.
@@ -0,0 +1,2 @@
1
+ Installation
2
+ ============
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2015-2026 CERN
4
+ Copyright (c) 2022-2026 Graz University of Technology.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ Lars Holm Nielsen <lars.holm.nielsen@cern.ch> (@lnielsen)
2
+ Krzysztof Nowak <k.nowak@cern.ch> (@krzysztof)
@@ -0,0 +1,41 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # This file is part of Invenio-VCS.
4
+ # Copyright (C) 2023-2026 CERN.
5
+ #
6
+ # Invenio-VCS is free software; you can redistribute it and/or modify
7
+ # it under the terms of the MIT License; see LICENSE file for more details.
8
+
9
+ exclude .dockerignore
10
+ exclude .editorconfig
11
+ exclude .tx/config
12
+ exclude pytest.ini
13
+ include *.txt
14
+ include MAINTAINERS
15
+ include *.rst
16
+ include babel.ini
17
+ include .lgtm
18
+ include LICENSE
19
+ include .prettierrc
20
+ include *.yml
21
+ include run-js-linter.sh
22
+ include run-tests.sh
23
+ include run-i18n-tests.sh
24
+ prune docs/_build
25
+ prune docs/_build
26
+ prune tests
27
+ recursive-include .github/workflows *.yml
28
+ recursive-include docs *.bat
29
+ recursive-include docs *.py
30
+ recursive-include docs *.rst
31
+ recursive-include docs *.txt
32
+ recursive-include docs Makefile
33
+ recursive-include invenio_vcs *.html
34
+ recursive-include invenio_vcs *.js
35
+ recursive-include invenio_vcs *.json
36
+ recursive-include invenio_vcs *.less
37
+ recursive-include invenio_vcs *.mo
38
+ recursive-include invenio_vcs *.po
39
+ recursive-include invenio_vcs *.pot
40
+ recursive-include invenio_vcs *.py
41
+ include .git-blame-ignore-revs
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: invenio-vcs
3
+ Version: 0.0.1
4
+ Summary: "Invenio module that adds VCS integration to the platform."
5
+ Home-page: https://github.com/inveniosoftware/invenio-vcs
6
+ Author: CERN
7
+ Author-email: info@inveniosoftware.org
8
+ License: MIT
9
+ Keywords: invenio github gitlab vcs
10
+ Platform: any
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Requires-Python: >=3.7
13
+ License-File: LICENSE
14
+ License-File: AUTHORS.rst
15
+ Requires-Dist: Flask-Menu<3.0.0,>=2.0.0
16
+ Requires-Dist: PyYAML>=5.4.1
17
+ Requires-Dist: email-validator>=1.0.5
18
+ Requires-Dist: humanize>=0.5.1
19
+ Requires-Dist: python-dateutil<3.0.0,>=2.9.0
20
+ Requires-Dist: invenio-assets<5.0.0,>=4.0.0
21
+ Requires-Dist: invenio-accounts<8.0.0,>=7.0.0
22
+ Requires-Dist: invenio-celery<3.0.0,>=2.0.0
23
+ Requires-Dist: invenio-db[mysql,postgresql]<3.0.0,>=2.0.0
24
+ Requires-Dist: invenio-formatter<5.0.0,>=4.0.0
25
+ Requires-Dist: invenio-i18n<4.0.0,>=3.0.0
26
+ Requires-Dist: invenio-oauth2server<5.0.0,>=4.0.0
27
+ Requires-Dist: invenio-oauthclient<8.0.0,>=7.0.0
28
+ Requires-Dist: invenio-pidstore<4.0.0,>=3.0.0
29
+ Requires-Dist: invenio-records-rest<5.0.0,>=4.0.0
30
+ Requires-Dist: invenio-webhooks<3.0.0,>=2.0.0
31
+ Requires-Dist: invenio-records-resources<10.0.0,>=9.0.0
32
+ Requires-Dist: invenio-notifications<2.0.0,>=1.0.0
33
+ Requires-Dist: invenio-users-resources<11.0.0,>=10.0.0
34
+ Requires-Dist: invenio-jobs<9.0.0,>=7.0.0
35
+ Requires-Dist: mistune>=0.7.2
36
+ Requires-Dist: six>=1.12.0
37
+ Requires-Dist: uritemplate>=3.0.1
38
+ Requires-Dist: click>=8.1.8
39
+ Requires-Dist: github3.py<5.0.0,>=4.0.1
40
+ Requires-Dist: python-gitlab<7.0.0,>=6.2.0
41
+ Provides-Extra: tests
42
+ Requires-Dist: httpretty>=0.8.14; extra == "tests"
43
+ Requires-Dist: invenio-app<4.0.0,>=3.0.0; extra == "tests"
44
+ Requires-Dist: invenio-db[mysql,postgresql]<3.0.0,>=2.0.0; extra == "tests"
45
+ Requires-Dist: invenio-files-rest<5.0.0,>=4.0.0; extra == "tests"
46
+ Requires-Dist: isort>=4.2.2; extra == "tests"
47
+ Requires-Dist: pytest-black-ng>=0.4.0; extra == "tests"
48
+ Requires-Dist: pytest-invenio<4.0.0,>=3.0.0; extra == "tests"
49
+ Requires-Dist: pytest-mock>=2.0.0; extra == "tests"
50
+ Requires-Dist: sphinx>=4.5.0; extra == "tests"
51
+ Provides-Extra: elasticsearch7
52
+ Requires-Dist: invenio-search[elasticsearch7]<4.0.0,>=3.0.0; extra == "elasticsearch7"
53
+ Provides-Extra: opensearch1
54
+ Requires-Dist: invenio-search[opensearch1]<4.0.0,>=3.0.0; extra == "opensearch1"
55
+ Provides-Extra: opensearch2
56
+ Requires-Dist: invenio-search[opensearch2]<4.0.0,>=3.0.0; extra == "opensearch2"
57
+ Dynamic: license-file
58
+
59
+ ..
60
+ This file is part of Invenio-VCS.
61
+ Copyright (C) 2023-2026 CERN.
62
+
63
+ Invenio-VCS is free software; you can redistribute it and/or modify
64
+ it under the terms of the MIT License; see LICENSE file for more details.
65
+
66
+ ================
67
+ Invenio-VCS
68
+ ================
69
+
70
+ .. image:: https://img.shields.io/travis/inveniosoftware/invenio-vcs.svg
71
+ :target: https://travis-ci.org/inveniosoftware/invenio-vcs
72
+
73
+ .. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-vcs.svg
74
+ :target: https://coveralls.io/r/inveniosoftware/invenio-vcs
75
+
76
+ .. image:: https://img.shields.io/github/tag/inveniosoftware/invenio-vcs.svg
77
+ :target: https://github.com/inveniosoftware/invenio-vcs/releases
78
+
79
+ .. image:: https://img.shields.io/pypi/dm/invenio-vcs.svg
80
+ :target: https://pypi.python.org/pypi/invenio-vcs
81
+
82
+ .. image:: https://img.shields.io/github/license/inveniosoftware/invenio-vcs.svg
83
+ :target: https://github.com/inveniosoftware/invenio-vcs/blob/master/LICENSE
84
+
85
+
86
+ Invenio module that adds VCS integration to the platform.
87
+
88
+ This module derives from the `Invenio GitHub`_ module, but is nearly fully rewritten and not
89
+ backward compatible. Please refer to the upgrade guide to transition your instance to this
90
+ new module.
91
+
92
+ .. _Invenio GitHub: https://github.com/inveniosoftware/invenio-github
93
+
94
+ *This is an experimental developer preview release.*
95
+
96
+ * Free software: MIT license
97
+ * Documentation: https://invenio-vcs.readthedocs.io/
98
+
99
+ ..
100
+ This file is part of Invenio-VCS.
101
+ Copyright (C) 2016-2026 CERN.
102
+ Copyright (C) 2024-2026 Graz University of Technology.
103
+
104
+ Invenio-VCS is free software; you can redistribute it and/or modify
105
+ it under the terms of the MIT License; see LICENSE file for more details.
106
+
107
+ Changes
108
+ =======
109
+
110
+ Version 0.0.1 (release 2026-04-01)
111
+
112
+ - initial release
@@ -0,0 +1,39 @@
1
+ ..
2
+ This file is part of Invenio-VCS.
3
+ Copyright (C) 2023-2026 CERN.
4
+
5
+ Invenio-VCS is free software; you can redistribute it and/or modify
6
+ it under the terms of the MIT License; see LICENSE file for more details.
7
+
8
+ ================
9
+ Invenio-VCS
10
+ ================
11
+
12
+ .. image:: https://img.shields.io/travis/inveniosoftware/invenio-vcs.svg
13
+ :target: https://travis-ci.org/inveniosoftware/invenio-vcs
14
+
15
+ .. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-vcs.svg
16
+ :target: https://coveralls.io/r/inveniosoftware/invenio-vcs
17
+
18
+ .. image:: https://img.shields.io/github/tag/inveniosoftware/invenio-vcs.svg
19
+ :target: https://github.com/inveniosoftware/invenio-vcs/releases
20
+
21
+ .. image:: https://img.shields.io/pypi/dm/invenio-vcs.svg
22
+ :target: https://pypi.python.org/pypi/invenio-vcs
23
+
24
+ .. image:: https://img.shields.io/github/license/inveniosoftware/invenio-vcs.svg
25
+ :target: https://github.com/inveniosoftware/invenio-vcs/blob/master/LICENSE
26
+
27
+
28
+ Invenio module that adds VCS integration to the platform.
29
+
30
+ This module derives from the `Invenio GitHub`_ module, but is nearly fully rewritten and not
31
+ backward compatible. Please refer to the upgrade guide to transition your instance to this
32
+ new module.
33
+
34
+ .. _Invenio GitHub: https://github.com/inveniosoftware/invenio-github
35
+
36
+ *This is an experimental developer preview release.*
37
+
38
+ * Free software: MIT license
39
+ * Documentation: https://invenio-vcs.readthedocs.io/
@@ -0,0 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2023-2026 CERN.
4
+ #
5
+ # Invenio-VCS is free software; you can redistribute it and/or modify it
6
+ # under the terms of the MIT License; see LICENSE file for more details.
7
+
8
+ # Extraction from Python source files
9
+ [python: **.py]
10
+ encoding = utf-8
11
+
12
+ # Extraction from Jinja2 templates
13
+ [jinja2: **/templates/**.html]
14
+ encoding = utf-8
@@ -0,0 +1 @@
1
+ # Empty on purpose
@@ -0,0 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2023-2026 CERN.
4
+ # Copyright (C) 2024-2025 Graz University of Technology.
5
+ #
6
+ # Invenio-VCS is free software; you can redistribute it and/or modify
7
+ # it under the terms of the MIT License; see LICENSE file for more details.
8
+ """Invenio module that adds VCS integration to the platform."""
9
+
10
+ from .ext import InvenioVCS
11
+
12
+ __version__ = "0.0.1"
13
+
14
+ __all__ = ("__version__", "InvenioVCS")
@@ -0,0 +1,131 @@
1
+ # -*- coding: utf-8 -*-
2
+ # This file is part of Invenio.
3
+ # Copyright (C) 2026 CERN.
4
+ #
5
+ # Invenio is free software; you can redistribute it and/or modify it
6
+ # under the terms of the MIT License; see LICENSE file for more details.
7
+
8
+ """Switch to a generic VCS module (not GitHub-specific)."""
9
+
10
+ import sqlalchemy as sa
11
+ from alembic import op
12
+ from invenio_db.shared import UTCDateTime
13
+ from sqlalchemy_utils import JSONType, UUIDType
14
+
15
+ # revision identifiers, used by Alembic.
16
+ revision = "1754318294"
17
+ down_revision = "6abc1c58775e"
18
+ branch_labels = ()
19
+ depends_on = None
20
+
21
+
22
+ def upgrade():
23
+ """Upgrade database."""
24
+ op.create_table(
25
+ "vcs_repositories",
26
+ sa.Column("id", UUIDType()),
27
+ sa.Column("provider_id", sa.String(length=255), nullable=False),
28
+ sa.Column(
29
+ "provider", sa.String(length=255), nullable=False, server_default="github"
30
+ ),
31
+ sa.Column("name", sa.String(length=255), nullable=False),
32
+ sa.Column(
33
+ "default_branch",
34
+ sa.String(length=255),
35
+ nullable=False,
36
+ server_default="main",
37
+ ),
38
+ sa.Column("description", sa.String(length=10000)),
39
+ sa.Column("hook", sa.String(length=255)),
40
+ sa.Column("enabled_by_user_id", sa.Integer),
41
+ sa.Column("record_community_id", UUIDType(), nullable=True),
42
+ sa.Column("created", UTCDateTime(), nullable=False),
43
+ sa.Column("updated", UTCDateTime(), nullable=False),
44
+ sa.PrimaryKeyConstraint("id", name=op.f("pk_vcs_repositories")),
45
+ sa.ForeignKeyConstraint(
46
+ ["enabled_by_user_id"],
47
+ ["accounts_user.id"],
48
+ name=op.f("fk_vcs_repository_enabled_by_user_id_accounts_user"),
49
+ ),
50
+ sa.UniqueConstraint(
51
+ "provider",
52
+ "provider_id",
53
+ name=op.f("uq_vcs_repositories_provider_provider_id"),
54
+ ),
55
+ )
56
+
57
+ op.create_table(
58
+ "vcs_repository_users",
59
+ sa.Column("repository_id", UUIDType()),
60
+ sa.Column("user_id", sa.Integer()),
61
+ sa.Column("created", UTCDateTime(), nullable=False),
62
+ sa.Column("updated", UTCDateTime(), nullable=False),
63
+ sa.PrimaryKeyConstraint(
64
+ "repository_id", "user_id", name=op.f("pk_vcs_repository_users")
65
+ ),
66
+ sa.ForeignKeyConstraint(
67
+ ["repository_id"],
68
+ ["vcs_repositories.id"],
69
+ name=op.f("fk_vcs_repository_users_repository_id_vcs_repositories"),
70
+ ),
71
+ sa.ForeignKeyConstraint(
72
+ ["user_id"],
73
+ ["accounts_user.id"],
74
+ name=op.f("fk_vcs_repository_users_user_id_accounts_user"),
75
+ ),
76
+ )
77
+
78
+ op.create_table(
79
+ "vcs_releases",
80
+ sa.Column("id", UUIDType()),
81
+ sa.Column("provider_id", sa.String(length=255), nullable=False),
82
+ sa.Column(
83
+ "provider", sa.String(length=255), nullable=False, server_default="github"
84
+ ),
85
+ sa.Column("tag", sa.String(length=255), nullable=False),
86
+ sa.Column(
87
+ "errors",
88
+ sa.JSON()
89
+ .with_variant(sa.dialects.postgresql.JSONB(), "postgresql")
90
+ .with_variant(JSONType(), "sqlite")
91
+ .with_variant(JSONType(), "mysql"),
92
+ ),
93
+ sa.Column("repository_id", UUIDType(), nullable=False),
94
+ sa.Column("event_id", UUIDType(), nullable=True),
95
+ sa.Column("record_id", UUIDType(), nullable=True),
96
+ sa.Column(
97
+ "record_is_draft", sa.Boolean(), server_default="false", nullable=True
98
+ ),
99
+ sa.Column("status", sa.CHAR(1)),
100
+ sa.Column("created", UTCDateTime(), nullable=False),
101
+ sa.Column("updated", UTCDateTime(), nullable=False),
102
+ sa.PrimaryKeyConstraint("id", name=op.f("pk_vcs_releases")),
103
+ sa.ForeignKeyConstraint(
104
+ ["event_id"],
105
+ ["webhooks_events.id"],
106
+ name=op.f("fk_vcs_releases_event_id_webhooks_events"),
107
+ ),
108
+ sa.ForeignKeyConstraint(
109
+ ["repository_id"],
110
+ ["vcs_repositories.id"],
111
+ name=op.f("fk_vcs_releases_repository_id_vcs_repositories"),
112
+ ),
113
+ sa.UniqueConstraint(
114
+ "provider",
115
+ "provider_id",
116
+ name=op.f("uq_vcs_releases_provider_id_provider"),
117
+ ),
118
+ )
119
+
120
+ op.create_index(
121
+ op.f("ix_vcs_releases_record_id"),
122
+ table_name="vcs_releases",
123
+ columns=["record_id"],
124
+ )
125
+
126
+
127
+ def downgrade():
128
+ """Downgrade database."""
129
+ op.drop_table("vcs_releases")
130
+ op.drop_table("vcs_repository_users")
131
+ op.drop_table("vcs_repositories")
@@ -0,0 +1,38 @@
1
+ # -*- coding: utf-8 -*-
2
+ # This file is part of Invenio.
3
+ # Copyright (C) 2026 CERN.
4
+ #
5
+ # Invenio is free software; you can redistribute it and/or modify it
6
+ # under the terms of the MIT License; see LICENSE file for more details.
7
+
8
+ """create vcs branch.
9
+
10
+ Revision ID: 6abc1c58775e
11
+ Revises:
12
+ Create Date: 2026-02-03 14:31:10.367638
13
+
14
+ """
15
+
16
+ from typing import Sequence, Union
17
+
18
+ import sqlalchemy as sa
19
+ from alembic import op
20
+
21
+ # revision identifiers, used by Alembic.
22
+ revision: str = "6abc1c58775e"
23
+ down_revision: Union[str, Sequence[str], None] = None
24
+ # We are creating a brand new branch invenio_vcs instead of continuing the existing invenio_github.
25
+ # The new migrations do not assume anything about the existing tables and do not attempt to delete them.
26
+ # Data must be migrated over manually or using the upgrade script.
27
+ branch_labels: Union[str, Sequence[str], None] = ("invenio_vcs",)
28
+ depends_on: Union[str, Sequence[str], None] = None
29
+
30
+
31
+ def upgrade() -> None:
32
+ """Upgrade schema."""
33
+ pass
34
+
35
+
36
+ def downgrade() -> None:
37
+ """Downgrade schema."""
38
+ pass