invenio-github 3.0.0__tar.gz → 3.0.2__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 (85) hide show
  1. {invenio_github-3.0.0 → invenio_github-3.0.2}/AUTHORS.rst +2 -1
  2. {invenio_github-3.0.0 → invenio_github-3.0.2}/CHANGES.rst +11 -0
  3. {invenio_github-3.0.0 → invenio_github-3.0.2}/PKG-INFO +12 -2
  4. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/__init__.py +2 -2
  5. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/api.py +62 -30
  6. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/assets/semantic-ui/js/invenio_github/index.js +4 -4
  7. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/config.py +11 -1
  8. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/errors.py +11 -1
  9. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/views/github.py +2 -2
  10. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github.egg-info/PKG-INFO +12 -2
  11. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github.egg-info/SOURCES.txt +0 -16
  12. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github.egg-info/requires.txt +0 -1
  13. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github.egg-info/top_level.txt +0 -1
  14. {invenio_github-3.0.0 → invenio_github-3.0.2}/setup.cfg +0 -1
  15. invenio_github-3.0.0/.github/workflows/i18n-pull.yml +0 -14
  16. invenio_github-3.0.0/.github/workflows/i18n-push.yml +0 -16
  17. invenio_github-3.0.0/.github/workflows/pypi-publish.yml +0 -22
  18. invenio_github-3.0.0/.github/workflows/tests.yml +0 -31
  19. invenio_github-3.0.0/docs/Makefile +0 -192
  20. invenio_github-3.0.0/docs/api.rst +0 -30
  21. invenio_github-3.0.0/docs/authors.rst +0 -25
  22. invenio_github-3.0.0/docs/changes.rst +0 -25
  23. invenio_github-3.0.0/docs/conf.py +0 -335
  24. invenio_github-3.0.0/docs/contributing.rst +0 -25
  25. invenio_github-3.0.0/docs/index.rst +0 -63
  26. invenio_github-3.0.0/docs/installation.rst +0 -25
  27. invenio_github-3.0.0/docs/license.rst +0 -19
  28. invenio_github-3.0.0/docs/make.bat +0 -263
  29. invenio_github-3.0.0/docs/requirements.txt +0 -1
  30. invenio_github-3.0.0/docs/usage.rst +0 -28
  31. {invenio_github-3.0.0 → invenio_github-3.0.2}/.git-blame-ignore-revs +0 -0
  32. {invenio_github-3.0.0 → invenio_github-3.0.2}/.lgtm +0 -0
  33. {invenio_github-3.0.0 → invenio_github-3.0.2}/.travis.yml +0 -0
  34. {invenio_github-3.0.0 → invenio_github-3.0.2}/CONTRIBUTING.rst +0 -0
  35. {invenio_github-3.0.0 → invenio_github-3.0.2}/INSTALL.rst +0 -0
  36. {invenio_github-3.0.0 → invenio_github-3.0.2}/LICENSE +0 -0
  37. {invenio_github-3.0.0 → invenio_github-3.0.2}/MAINTAINERS +0 -0
  38. {invenio_github-3.0.0 → invenio_github-3.0.2}/MANIFEST.in +0 -0
  39. {invenio_github-3.0.0 → invenio_github-3.0.2}/README.rst +0 -0
  40. {invenio_github-3.0.0 → invenio_github-3.0.2}/RELEASE-NOTES.rst +0 -0
  41. {invenio_github-3.0.0 → invenio_github-3.0.2}/babel.ini +0 -0
  42. {invenio_github-3.0.0 → invenio_github-3.0.2}/constraints-pypi.txt +0 -0
  43. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/alembic/5a5428312b2b_create_github_branch.py +0 -0
  44. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/alembic/b0eaee37b545_create_github_tables.py +0 -0
  45. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/ext.py +0 -0
  46. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/models.py +0 -0
  47. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/oauth/handlers.py +0 -0
  48. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/oauth/remote_app.py +0 -0
  49. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/proxies.py +0 -0
  50. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/receivers.py +0 -0
  51. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/tasks.py +0 -0
  52. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/templates/semantic-ui/invenio_github/base.html +0 -0
  53. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/templates/semantic-ui/invenio_github/helpers.html +0 -0
  54. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/templates/semantic-ui/invenio_github/settings/base.html +0 -0
  55. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/templates/semantic-ui/invenio_github/settings/helpers.html +0 -0
  56. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/templates/semantic-ui/invenio_github/settings/index.html +0 -0
  57. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/templates/semantic-ui/invenio_github/settings/index_item.html +0 -0
  58. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/templates/semantic-ui/invenio_github/settings/view.html +0 -0
  59. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/cs/LC_MESSAGES/messages.mo +0 -0
  60. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/cs/LC_MESSAGES/messages.po +0 -0
  61. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/da/LC_MESSAGES/messages.mo +0 -0
  62. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/da/LC_MESSAGES/messages.po +0 -0
  63. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/de/LC_MESSAGES/messages.mo +0 -0
  64. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/de/LC_MESSAGES/messages.po +0 -0
  65. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/en/LC_MESSAGES/messages.mo +0 -0
  66. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/en/LC_MESSAGES/messages.po +0 -0
  67. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/es/LC_MESSAGES/messages.mo +0 -0
  68. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/es/LC_MESSAGES/messages.po +0 -0
  69. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/fr/LC_MESSAGES/messages.mo +0 -0
  70. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/fr/LC_MESSAGES/messages.po +0 -0
  71. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/it/LC_MESSAGES/messages.mo +0 -0
  72. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/it/LC_MESSAGES/messages.po +0 -0
  73. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/translations/messages.pot +0 -0
  74. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/utils.py +0 -0
  75. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/views/__init__.py +0 -0
  76. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/views/badge.py +0 -0
  77. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github/webpack.py +0 -0
  78. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github.egg-info/dependency_links.txt +0 -0
  79. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github.egg-info/entry_points.txt +0 -0
  80. {invenio_github-3.0.0 → invenio_github-3.0.2}/invenio_github.egg-info/not-zip-safe +0 -0
  81. {invenio_github-3.0.0 → invenio_github-3.0.2}/pyproject.toml +0 -0
  82. {invenio_github-3.0.0 → invenio_github-3.0.2}/requirements-devel.txt +0 -0
  83. {invenio_github-3.0.0 → invenio_github-3.0.2}/run-i18n-tests.sh +0 -0
  84. {invenio_github-3.0.0 → invenio_github-3.0.2}/run-tests.sh +0 -0
  85. {invenio_github-3.0.0 → invenio_github-3.0.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  ..
2
2
  This file is part of Invenio.
3
- Copyright (C) 2016 CERN.
3
+ Copyright (C) 2016-2025 CERN.
4
4
 
5
5
  Invenio is free software; you can redistribute it
6
6
  and/or modify it under the terms of the GNU General Public License as
@@ -35,3 +35,4 @@ Invenio module that adds GitHub integration to the platform.
35
35
  - Jiri Kuncar <jiri.kuncar@cern.ch>
36
36
  - Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
37
37
  - Tibor Simko <tibor.simko@cern.ch>
38
+ - Till Korten <t.korten@hzdr.de>
@@ -26,6 +26,17 @@
26
26
  Changes
27
27
  =======
28
28
 
29
+ Version v3.0.2 (released 2025-11-26)
30
+
31
+ - api: optimize sync process with batch task execution
32
+ * prevent GitHub page timeout with 504 after sync
33
+ * optimize sync process with batch task execution
34
+ * add tests for sync() and sync_repo_hooks() methods
35
+
36
+ Version v3.0.1 (released 2025-07-30)
37
+
38
+ - api: fix set alternate zipball URL when tag and branch having same name
39
+
29
40
  Version 3.0.0 (release 2025-06-03)
30
41
 
31
42
  - setup: bump major dependencies
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invenio-github
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: "Invenio module that adds GitHub integration to the platform."
5
5
  Home-page: https://github.com/inveniosoftware/invenio-github
6
6
  Author: CERN
@@ -39,7 +39,6 @@ Requires-Dist: invenio-db[mysql,postgresql]<3.0.0,>=2.0.0; extra == "tests"
39
39
  Requires-Dist: invenio-files-rest<4.0.0,>=3.0.0; extra == "tests"
40
40
  Requires-Dist: isort>=4.2.2; extra == "tests"
41
41
  Requires-Dist: mock>=2.0.0; extra == "tests"
42
- Requires-Dist: pluggy<1.0,>=0.12; extra == "tests"
43
42
  Requires-Dist: pytest-black-ng>=0.4.0; extra == "tests"
44
43
  Requires-Dist: pytest-invenio<4.0.0,>=3.0.0; extra == "tests"
45
44
  Requires-Dist: pytest-mock>=2.0.0; extra == "tests"
@@ -130,6 +129,17 @@ Invenio module that adds GitHub integration to the platform.
130
129
  Changes
131
130
  =======
132
131
 
132
+ Version v3.0.2 (released 2025-11-26)
133
+
134
+ - api: optimize sync process with batch task execution
135
+ * prevent GitHub page timeout with 504 after sync
136
+ * optimize sync process with batch task execution
137
+ * add tests for sync() and sync_repo_hooks() methods
138
+
139
+ Version v3.0.1 (released 2025-07-30)
140
+
141
+ - api: fix set alternate zipball URL when tag and branch having same name
142
+
133
143
  Version 3.0.0 (release 2025-06-03)
134
144
 
135
145
  - setup: bump major dependencies
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # This file is part of Invenio.
4
- # Copyright (C) 2023-2024 CERN.
4
+ # Copyright (C) 2023-2025 CERN.
5
5
  # Copyright (C) 2024-2025 Graz University of Technology.
6
6
  #
7
7
  # Invenio is free software; you can redistribute it
@@ -27,6 +27,6 @@
27
27
 
28
28
  from .ext import InvenioGitHub
29
29
 
30
- __version__ = "3.0.0"
30
+ __version__ = "3.0.2"
31
31
 
32
32
  __all__ = ("__version__", "InvenioGitHub")
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # This file is part of Invenio.
4
- # Copyright (C) 2023 CERN.
4
+ # Copyright (C) 2023-2025 CERN.
5
5
  # Copyright (C) 2024 KTH Royal Institute of Technology.
6
6
  #
7
7
  # Invenio is free software; you can redistribute it
@@ -32,7 +32,6 @@ from copy import deepcopy
32
32
  from urllib.parse import urlparse
33
33
 
34
34
  import github3
35
- import humanize
36
35
  import requests
37
36
  from flask import current_app
38
37
  from invenio_access.permissions import authenticated_user
@@ -53,6 +52,7 @@ from invenio_github.tasks import sync_hooks as sync_hooks_task
53
52
  from invenio_github.utils import iso_utcnow, parse_timestamp, utcnow
54
53
 
55
54
  from .errors import (
55
+ ReleaseZipballFetchError,
56
56
  RemoteAccountDataNotSet,
57
57
  RemoteAccountNotFound,
58
58
  RepositoryAccessError,
@@ -219,7 +219,7 @@ class GitHubAPI(object):
219
219
  Repository.query.filter(
220
220
  Repository.user_id == self.user_id,
221
221
  ~Repository.github_id.in_(github_repos.keys()),
222
- ).update(dict(user_id=None, hook=None), synchronize_session=False)
222
+ ).update({"user_id": None, "hook": None}, synchronize_session=False)
223
223
 
224
224
  # Update repos and last sync
225
225
  self.account.extra_data.update(
@@ -246,7 +246,11 @@ class GitHubAPI(object):
246
246
  else:
247
247
  # If hooks will run asynchronously, we need to commit any changes done so far
248
248
  db.session.commit()
249
- sync_hooks_task.delay(self.user_id, repos)
249
+ # Create a task for several batches of repositories to speed up the process
250
+ # and ensure that each task finishes within the time limit on Zenodo
251
+ batch_size = current_app.config["GITHUB_WEBHOOK_SYNC_BATCH_SIZE"]
252
+ for i in range(0, len(repos), batch_size):
253
+ sync_hooks_task.delay(self.user_id, repos[i : i + batch_size])
250
254
 
251
255
  def _valid_webhook(self, url):
252
256
  """Check if webhook url is valid.
@@ -482,6 +486,7 @@ class GitHubRelease(object):
482
486
  def __init__(self, release):
483
487
  """Constructor."""
484
488
  self.release_object = release
489
+ self._resolved_zipball_url = None
485
490
 
486
491
  @cached_property
487
492
  def record(self):
@@ -534,7 +539,7 @@ class GitHubRelease(object):
534
539
 
535
540
  @cached_property
536
541
  def release_zipball_url(self):
537
- """Returns the release zipball url."""
542
+ """Returns the release zipball URL."""
538
543
  return self.release_payload["zipball_url"]
539
544
 
540
545
  @cached_property
@@ -599,32 +604,58 @@ class GitHubRelease(object):
599
604
  return True if not latest_release else False
600
605
 
601
606
  def test_zipball(self):
602
- """Extract files to download from GitHub payload."""
603
- zipball_url = self.release_payload["zipball_url"]
607
+ """Test if the zipball URL is accessible and return the resolved URL."""
608
+ return self.resolve_zipball_url()
604
609
 
605
- # Execute a HEAD request to the zipball url to test the url.
606
- response = self.gh.api.session.head(zipball_url, allow_redirects=True)
610
+ def resolve_zipball_url(self, cache=True):
611
+ """Resolve the zipball URL.
607
612
 
608
- # In case where there is a tag and branch with the same name, we might
609
- # get back a "300 Mutliple Choices" response, which requires fetching
610
- # an "alternate" link.
613
+ This method will try to resolve the zipball URL by making a HEAD request,
614
+ handling the following edge cases:
615
+
616
+ - In the case of a 300 Multiple Choices response, which can happen when a tag
617
+ and branch have the same name, it will try to fetch an "alternate" link.
618
+ - If the access token does not have the required scopes/permissions to access
619
+ public links, it will fallback to a non-authenticated request.
620
+ """
621
+ if self._resolved_zipball_url and cache:
622
+ return self._resolved_zipball_url
623
+
624
+ url = self.release_zipball_url
625
+
626
+ # Execute a HEAD request to the zipball url to test if it is accessible.
627
+ response = self.gh.api.session.head(url, allow_redirects=True)
628
+
629
+ # In case where there is a tag and branch with the same name, we might get back
630
+ # a "300 Multiple Choices" response, which requires fetching an "alternate"
631
+ # link.
611
632
  if response.status_code == 300:
612
- zipball_url = response.links.get("alternate", {}).get("url")
613
- if zipball_url:
614
- response = self.gh.api.session.head(zipball_url, allow_redirects=True)
615
- # Another edge-case, is when the access token we have does not
616
- # have the scopes/permissions to access public links. In that
617
- # rare case we fallback to a non-authenticated request.
618
- if response.status_code == 404:
619
- response = requests.head(zipball_url, allow_redirects=True)
620
- # If this response is successful we want to use the finally
621
- # resolved URL to fetch the ZIP from.
622
- if response.status_code == 200:
623
- zipball_url = response.url
624
-
625
- assert (
626
- response.status_code == 200
627
- ), f"Could not retrieve archive from GitHub: {zipball_url}"
633
+ alternate_url = response.links.get("alternate", {}).get("url")
634
+ if alternate_url:
635
+ url = alternate_url # Use the alternate URL
636
+ response = self.gh.api.session.head(url, allow_redirects=True)
637
+
638
+ # Another edge-case, is when the access token we have does not have the
639
+ # scopes/permissions to access public links. In that rare case we fallback to a
640
+ # non-authenticated request.
641
+ if response.status_code == 404:
642
+ current_app.logger.warning(
643
+ "GitHub zipball URL {url} not found, trying unauthenticated request.",
644
+ extra={"url": response.url},
645
+ )
646
+ response = requests.head(url, allow_redirects=True)
647
+ # If this response is successful we want to use the finally resolved URL to
648
+ # fetch the ZIP from.
649
+ if response.status_code == 200:
650
+ return response.url
651
+
652
+ if response.status_code != 200:
653
+ raise ReleaseZipballFetchError()
654
+
655
+ if cache:
656
+ self._resolved_zipball_url = response.url
657
+
658
+ return response.url
628
659
 
629
660
  # High level API
630
661
 
@@ -663,8 +694,9 @@ class GitHubRelease(object):
663
694
  """Fetch release zipball file using the current github session."""
664
695
  session = self.gh.api.session
665
696
  timeout = current_app.config.get("GITHUB_ZIPBALL_TIMEOUT", 300)
666
- with session.get(self.release_zipball_url, stream=True, timeout=timeout) as s:
667
- yield s.raw
697
+ zipball_url = self.resolve_zipball_url()
698
+ with session.get(zipball_url, stream=True, timeout=timeout) as resp:
699
+ yield resp.raw
668
700
 
669
701
  def publish(self):
670
702
  """Publish a GitHub release."""
@@ -1,5 +1,5 @@
1
1
  // This file is part of InvenioGithub
2
- // Copyright (C) 2023 CERN.
2
+ // Copyright (C) 2023-2025 CERN.
3
3
  //
4
4
  // Invenio Github is free software; you can redistribute it and/or modify it
5
5
  // under the terms of the MIT License; see LICENSE file for more details.
@@ -75,7 +75,7 @@ if (sync_button) {
75
75
  resultMessage,
76
76
  "positive",
77
77
  "checkmark",
78
- "Repositories synced successfully. Please reload the page."
78
+ "Repositories synced successfully. Some items may still be updating, please reload the page in about a minute."
79
79
  );
80
80
  sync_button.classList.remove("disabled");
81
81
  setTimeout(function () {
@@ -95,7 +95,7 @@ if (sync_button) {
95
95
  }
96
96
  } catch (error) {
97
97
  loaderIcon.classList.remove("loading");
98
- if(error.message === "timeout"){
98
+ if (error.message === "timeout") {
99
99
  addResultMessage(
100
100
  resultMessage,
101
101
  "warning",
@@ -110,7 +110,7 @@ if (sync_button) {
110
110
  "cancel",
111
111
  `There has been a problem: ${error}`
112
112
  );
113
- setTimeout(function () {
113
+ setTimeout(function () {
114
114
  resultMessage.classList.add("hidden");
115
115
  }, 7000);
116
116
  }
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # This file is part of Invenio.
4
- # Copyright (C) 2023 CERN.
4
+ # Copyright (C) 2023-2025 CERN.
5
5
  #
6
6
  # Invenio is free software: you can redistribute it and/or modify
7
7
  # it under the terms of the GNU General Public License as published by
@@ -41,6 +41,16 @@ This configuration variable must be set explicitly. Example::
41
41
  context, doesn't work as expected.
42
42
  """
43
43
 
44
+ GITHUB_WEBHOOK_SYNC_BATCH_SIZE = 20
45
+ """Number of repositories to be processed in a single batch when syncing hooks.
46
+
47
+ If the user has more than 20 repositories, multiple tasks will be created,
48
+ syncing them in parallel. Thereby the sync process should finish in a timely
49
+ manner and we avoid timeouts on platforms like Zenodo.
50
+
51
+ Decrease this value if you experience task timeouts.
52
+ """
53
+
44
54
  GITHUB_SHARED_SECRET = "CHANGEME"
45
55
  """Shared secret between you and GitHub.
46
56
 
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # This file is part of Invenio.
4
- # Copyright (C) 2023 CERN.
4
+ # Copyright (C) 2023-2025 CERN.
5
5
  # Copyright (C) 2024 KTH Royal Institute of Technology.
6
6
  #
7
7
  # Invenio is free software; you can redistribute it
@@ -153,3 +153,13 @@ class UnexpectedGithubResponse(GitHubError):
153
153
  def __init__(self, message=None):
154
154
  """Constructor."""
155
155
  super().__init__(message or self.message)
156
+
157
+
158
+ class ReleaseZipballFetchError(GitHubError):
159
+ """Error fetching release zipball file."""
160
+
161
+ message = _("Error fetching release zipball file.")
162
+
163
+ def __init__(self, message=None):
164
+ """Constructor."""
165
+ super().__init__(message or self.message)
@@ -155,7 +155,7 @@ def register_api_routes(blueprint):
155
155
  """
156
156
  try:
157
157
  github = GitHubAPI(user_id=current_user.id)
158
- github.sync(async_hooks=False)
158
+ github.sync()
159
159
  db.session.commit()
160
160
  except Exception as exc:
161
161
  current_app.logger.exception(str(exc))
@@ -171,7 +171,7 @@ def register_api_routes(blueprint):
171
171
  try:
172
172
  github = GitHubAPI(user_id=current_user.id)
173
173
  github.init_account()
174
- github.sync(async_hooks=False)
174
+ github.sync()
175
175
  db.session.commit()
176
176
  except Exception as exc:
177
177
  current_app.logger.exception(str(exc))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invenio-github
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: "Invenio module that adds GitHub integration to the platform."
5
5
  Home-page: https://github.com/inveniosoftware/invenio-github
6
6
  Author: CERN
@@ -39,7 +39,6 @@ Requires-Dist: invenio-db[mysql,postgresql]<3.0.0,>=2.0.0; extra == "tests"
39
39
  Requires-Dist: invenio-files-rest<4.0.0,>=3.0.0; extra == "tests"
40
40
  Requires-Dist: isort>=4.2.2; extra == "tests"
41
41
  Requires-Dist: mock>=2.0.0; extra == "tests"
42
- Requires-Dist: pluggy<1.0,>=0.12; extra == "tests"
43
42
  Requires-Dist: pytest-black-ng>=0.4.0; extra == "tests"
44
43
  Requires-Dist: pytest-invenio<4.0.0,>=3.0.0; extra == "tests"
45
44
  Requires-Dist: pytest-mock>=2.0.0; extra == "tests"
@@ -130,6 +129,17 @@ Invenio module that adds GitHub integration to the platform.
130
129
  Changes
131
130
  =======
132
131
 
132
+ Version v3.0.2 (released 2025-11-26)
133
+
134
+ - api: optimize sync process with batch task execution
135
+ * prevent GitHub page timeout with 504 after sync
136
+ * optimize sync process with batch task execution
137
+ * add tests for sync() and sync_repo_hooks() methods
138
+
139
+ Version v3.0.1 (released 2025-07-30)
140
+
141
+ - api: fix set alternate zipball URL when tag and branch having same name
142
+
133
143
  Version 3.0.0 (release 2025-06-03)
134
144
 
135
145
  - setup: bump major dependencies
@@ -18,22 +18,6 @@ run-i18n-tests.sh
18
18
  run-tests.sh
19
19
  setup.cfg
20
20
  setup.py
21
- .github/workflows/i18n-pull.yml
22
- .github/workflows/i18n-push.yml
23
- .github/workflows/pypi-publish.yml
24
- .github/workflows/tests.yml
25
- docs/Makefile
26
- docs/api.rst
27
- docs/authors.rst
28
- docs/changes.rst
29
- docs/conf.py
30
- docs/contributing.rst
31
- docs/index.rst
32
- docs/installation.rst
33
- docs/license.rst
34
- docs/make.bat
35
- docs/requirements.txt
36
- docs/usage.rst
37
21
  invenio_github/__init__.py
38
22
  invenio_github/api.py
39
23
  invenio_github/config.py
@@ -35,7 +35,6 @@ invenio-db[mysql,postgresql]<3.0.0,>=2.0.0
35
35
  invenio-files-rest<4.0.0,>=3.0.0
36
36
  isort>=4.2.2
37
37
  mock>=2.0.0
38
- pluggy<1.0,>=0.12
39
38
  pytest-black-ng>=0.4.0
40
39
  pytest-invenio<4.0.0,>=3.0.0
41
40
  pytest-mock>=2.0.0
@@ -47,7 +47,6 @@ tests =
47
47
  invenio-files-rest>=3.0.0,<4.0.0
48
48
  isort>=4.2.2
49
49
  mock>=2.0.0
50
- pluggy>=0.12,<1.0
51
50
  pytest-black-ng>=0.4.0
52
51
  pytest-invenio>=3.0.0,<4.0.0
53
52
  pytest-mock>=2.0.0
@@ -1,14 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2023 Graz University of Technology.
4
- #
5
- # Invenio 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
- name: i18n:pull translations
9
- on: workflow_dispatch # manually trigger
10
-
11
- jobs:
12
- i18n-pull:
13
- uses: inveniosoftware/invenio-i18n/.github/workflows/i18n-pull-base.yml@master
14
- secrets: inherit
@@ -1,16 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2023 Graz University of Technology.
4
- #
5
- # Invenio 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
- name: i18n:push translations
9
- on: workflow_dispatch # manually trigger
10
-
11
- jobs:
12
- i18n-extract:
13
- uses: inveniosoftware/invenio-i18n/.github/workflows/i18n-push-base.yml@master
14
- with:
15
- extract-backend: true
16
- secrets: inherit
@@ -1,22 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of Invenio.
4
- # Copyright (C) 2020-21 CERN.
5
- # Copyright (C) 2024 Graz University of Technology.
6
- #
7
- # Invenio is free software; you can redistribute it and/or modify it
8
- # under the terms of the MIT License; see LICENSE file for more details
9
-
10
- name: Publish
11
-
12
- on:
13
- push:
14
- tags:
15
- - v*
16
-
17
- jobs:
18
- Publish:
19
- uses: inveniosoftware/workflows/.github/workflows/pypi-publish.yml@master
20
- secrets: inherit
21
- with:
22
- babel-compile-catalog: true
@@ -1,31 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # This file is part of Invenio.
4
- # Copyright (C) 2023-2024 Graz University of Technology.
5
- # Copyright (C) 2024 KTH Royal Institute of Technology.
6
- #
7
- # Invenio is free software; you can redistribute it and/or modify it
8
- # under the terms of the MIT License; see LICENSE file for more details.
9
-
10
- name: CI
11
-
12
- on:
13
- push:
14
- branches:
15
- - master
16
- pull_request:
17
- branches:
18
- - master
19
- schedule:
20
- # * is a special character in YAML so you have to quote this string
21
- - cron: "0 3 * * 6"
22
- workflow_dispatch:
23
- inputs:
24
- reason:
25
- description: "Reason"
26
- required: false
27
- default: "Manual trigger"
28
-
29
- jobs:
30
- Tests:
31
- uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master