profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/Yajo/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

github/copilot-preview 8363

Documentation for GitHub Copilot

copier-org/copier 413

Library and command-line utility for rendering projects templates.

OCA/oca-addons-repo-template 14

OCA Repository Template

Antiun/odoo 1

Odoo (formerly OpenERP). Open Source Apps To Grow Your Business.

Yajo/doodba-devel 1

Personal Doodba-based development environment (use as an example for yours if you want, but this is forever-WIP repo)

Tecnativa/event 0

Event Management addons

Yajo/account-closing 0

Odoo Accountant closing tools

Pull request review commentcopier-org/copier

Support Python 3.10

 copier = "copier.cli:CopierApp.run" "Bug Tracker" = "https://github.com/pykong/copier/issues"  [tool.poetry.dependencies]-python = ">=3.6.1,<3.10"+python = ">=3.6.1"

Please put this to avoid possible future problems:

python = ">=3.6.1,<3.11"
timofurrer

comment created time in 10 hours

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentOCA/calendar

[FIX] resource_booking: allow creating if type has categories

/ocabot merge patch

Yajo

comment created time in 17 hours

PR opened OCA/calendar

[FIX] resource_booking: allow creating if type has categories

Without this patch, if you create a resource booking for a type that has categories (tags), it will fail with CacheMiss error.

@Tecnativa TT32552

+13 -9

0 comment

2 changed files

pr created time in 18 hours

create barnchTecnativa/calendar

branch : 13.0-resource_booking-fix_type_categs

created branch time in 18 hours

push eventTecnativa/calendar

Jairo Llopis

commit sha c86b1ad0aef9a564a03da9d4ed92d212c0201636

[IMP] resource_booking: use duration field instead of stop From now on, `resource.booking.type` duration represents the default duration that will be applied to new `resource.booking` of that type, instead of the hardcoded duration for every new booking. This means that you can create a new booking in pending state and define a custom duration before sending the portal link to customer. Thus, the available schedule slots in portal will be based on the type duration, whereas only those that have enough time left to complete the booking duration will be displayed. @Tecnativa TT30987

view details

Jairo Llopis

commit sha 1cd849d8c40f644aefb62391ce0c3dfe6dd78012

[IMP] resource_booking: configurable auto-assigned combination and location Thanks to this patch, you will be able to more predictably block the chosen resource combination, with the added checkbox. Also, the location field is propagated to `resource.booking` records, and synced from there to `calendar.event` if needed. This way, you can alter the location before sending the portal invitation. @Tecnativa TT30987

view details

Jairo Llopis

commit sha c07ea6ac4f17ad3687a6aac446cdc3978b91c07e

[FIX] resource_booking: "Involves me" filter The filter wasn't working fine due to the `auto_join=True` set in `meeting_id`. It was never displaying pending bookings. Besides, it wasn't necessary to keep it as a field because it was displayed nowhere and the search could be done directly in the view. This way, there's less python code to maintain and we disable the possibility of having a negative domain, which enters doomed scenarios when x2many fields are involved (see https://github.com/odoo/odoo/issues/43957). @Tecnativa TT30987

view details

Jairo Llopis

commit sha 64b58f7647f9c759d0230f976a73dc5a741961f5

[IMP] resource_booking: compatible with hr_holidays_public Adding `.with_context(exclude_public_holidays=True)` in needed places to let `hr_holidays_public` do its magic and never allow allocating a booking during a public holidays when that module is properly installed and configured. @Tecnativa TT30987

view details

Jairo Llopis

commit sha c9e23192df314c5cf20bba3524318283938ef23a

[IMP] resource_booking: optional name propagated to meeting - Allow users to optionally define a name for the resource booking. - Display that name in portal if set. - Sync it with meeting name when creating it. @Tecnativa TT30987

view details

OCA-git-bot

commit sha dc0545187ce1db0a93377f911c79700f9289b7c2

Merge PR #34 into 13.0 Signed-off-by pedrobaeza

view details

OCA-git-bot

commit sha d4ee972dbd8449392cf76d6422ba99fbc715245f

[UPD] addons table in README.md

view details

OCA-git-bot

commit sha 8996fb04eb8624c7f7dda9fa9e23eaed43a10661

[UPD] README.rst

view details

Jairo Llopis

commit sha 6243fc93c0104ea2d5c175316997183251bd0a00

[FIX] resource_booking: error when recurrent meetings exist Without this patch, when entering the Resource Bookings menu, if the current user attended any recurrent meeting, it failed with this error: ``` Server application error Error code: 200 Error message: Odoo Server Error Error data message: invalid input syntax for integer: "82-20210726143000" LINE 1: ... AND ("resource_booking"."meeting_id" in (3,5,81,'82-202107... ^ Error data debug: Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/http.py", line 624, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 310, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/opt/odoo/custom/src/odoo/odoo/tools/pycompat.py", line 14, in reraise raise value File "/opt/odoo/custom/src/odoo/odoo/http.py", line 669, in dispatch result = self._call_function(**self.params) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 350, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 339, in checked_call result = self.endpoint(*a, **kw) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 915, in __call__ return self.method(*args, **kw) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 515, in response_wrap response = f(*args, **kw) File "/opt/odoo/auto/addons/web/controllers/main.py", line 1339, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/odoo/auto/addons/web/controllers/main.py", line 1331, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo/custom/src/odoo/odoo/api.py", line 383, in call_kw result = _call_kw_model(method, model, args, kwargs) File "/opt/odoo/custom/src/odoo/odoo/api.py", line 356, in _call_kw_model result = method(recs, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4936, in search_read records = self.search(domain or [], offset=offset, limit=limit, order=order) File "/opt/odoo/custom/src/odoo/odoo/models.py", line 1648, in search res = self._search(args, offset=offset, limit=limit, order=order, count=count) File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4499, in _search self._cr.execute(query_str, where_clause_params) File "/opt/odoo/custom/src/odoo/odoo/sql_db.py", line 173, in wrapper return f(self, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/sql_db.py", line 250, in execute res = self._obj.execute(query, params) psycopg2.DataError: invalid input syntax for integer: "82-20210726143000" LINE 1: ... AND ("resource_booking"."meeting_id" in (3,5,81,'82-202107... ^ ``` @Tecnativa TT30987

view details

OCA-git-bot

commit sha 2f7ec3664c70ff2bb1a0aa35d7210619fbe96503

Merge PR #35 into 13.0 Signed-off-by Yajo

view details

OCA-git-bot

commit sha 5a2bc4638851ed537da42f19d8d0464effa3a997

resource_booking 13.0.2.0.1

view details

OCA-git-bot

commit sha 784f5f43404dd4f560d4c46c268104d618f69a39

[UPD] addons table in README.md

view details

Pedro M. Baeza

commit sha f167c7c1637546500b05ab06aded574b30538b32

[FIX] resource_booking: Proper calendar.event unlink signature Upstream ``unlink`` method in calendar.event adds this keyword argument.

view details

OCA-git-bot

commit sha b5b1db21c674be7b774887cfc9dbd28c2a7f969e

[UPD] addons table in README.md

view details

Jairo Llopis

commit sha 0d5a9743a25bc69763b7fa32b6671bfaed586238

[FIX] resource_booking: access error on normal calendar When a user had no resource_booking permissions and opened a calendar event linked to a resource booking, he got an unnecessary access error. @Tecnativa TT31238

view details

OCA-git-bot

commit sha 81e18d7d15fd3a43a7332eb0517b479373db7d18

Merge PR #36 into 13.0 Signed-off-by pedrobaeza

view details

OCA-git-bot

commit sha fa6efeeccb13e9c6bef86484e7d151fcfd375e62

resource_booking 13.0.2.1.0

view details

OCA-git-bot

commit sha f0341002b42979742cf34ad20f0fddf0ecdfdfed

[UPD] addons table in README.md

view details

Jairo Llopis

commit sha 09da5ab82f322816d57cae7de97e70ec9c53210c

[FIX] resource_booking: allow combination with other kind of leaves When `_leave_intervals_batch()` in `resource.calendar` is extended by other modules that add more leaves for any reason, the returned recordset must be of the `resource.calendar.leaves` model. Otherwise, Odoo fails with: TypeError: '<' not supported between instances of 'resource.resource' and 'resource.calendar.leaves' The resource didn't have a meaning here, so changing it to avoid bug. @Tecnativa TT31249

view details

OCA-git-bot

commit sha 6385409a25ddcdc94c73daab1805320773efc569

Merge PR #38 into 13.0 Signed-off-by pedrobaeza

view details

push time in 18 hours

push eventYajo/doodba-devel

Jairo Llopis

commit sha a113b1e20cbe076abaecaf82ab31e7b62629dd03

Update from template

view details

push time in 18 hours

created tagTecnativa/doodba-copier-template

tagv3.2.0

A Copier template for Doodba projects

created time in 18 hours

release Tecnativa/doodba-copier-template

v3.2.0

released time in 18 hours

Pull request review commentacsone/git-autoshare

Package suggested git script with Python package

 To upgrade git-autoshare at any time::      $ pipx upgrade git-autoshare -If you want ``git autoshare-clone`` to be invoked transparently in place of ``git clone``,-create the following bash script, name it ``git``, and place it in your ``PATH`` before ``/usr/bin/git``:--  .. code:: bash--    #!/bin/bash-    if [ "$1" == "clone" ]-    then-        shift-        /usr/bin/git autoshare-clone "$@"-    else-        /usr/bin/git "$@"-    fi+This will also install a simple script to transparently replace your calls to ``git clone`` with calls to+``git autoshare-clone``. To enable it, set the `GIT_AUTOSHARE=1` variable in your shell to a positive value.
``git autoshare-clone``. To enable it, export `GIT_AUTOSHARE=1` variable in your shell.
joao-p-marques

comment created time in a day

Pull request review commentacsone/git-autoshare

Package suggested git script with Python package

+#!/bin/bash+if [[ "$GIT_AUTOSHARE" == "1" && "$1" == "clone" ]]+then+    shift+    /usr/bin/git autoshare-clone "$@"

We don't want to affect people with git in other paths.

    "$0" autoshare-clone "$@"
joao-p-marques

comment created time in a day

Pull request review commentacsone/git-autoshare

Package suggested git script with Python package

+#!/bin/bash+if [[ "$GIT_AUTOSHARE" == "1" && "$1" == "clone" ]]+then+    shift+    /usr/bin/git autoshare-clone "$@"+else+    /usr/bin/git "$@"
    "$0" "$@"
joao-p-marques

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

delete branch Tecnativa/manufacture

delete branch : 13.0-mig-stock_whole_kit_constraint

delete time in a day

delete branch Tecnativa/oca-addons-repo-template

delete branch : fix-no-ignore-copier-yml

delete time in a day

Pull request review commentOCA/social

[IMP] mail_tracking{,_mailgun}: process sent events and fix wrong failure event mappings... and refactor

-You must configure Mailgun webhooks in order to receive mail events:--1. Got a Mailgun account and validate your sending domain.-2. Go to Webhook tab and configure the below URL for each event:--.. code:: html--   https://<your_domain>/mail/tracking/all/<your_database>--Replace '<your_domain>' with your Odoo install domain name-and '<your_database>' with your database name.--In order to validate Mailgun webhooks you have to configure the following system-parameters:--- `mailgun.apikey`: You can find Mailgun api_key in your validated sending-  domain.-- `mailgun.api_url`: It should be fine as it is, but it could change in the-  future.-- `mailgun.domain`: In case your sending domain is different from the one-  configured in `mail.catchall.domain`.-- `mailgun.validation_key`: If you want to be able to check mail address-  validity you must config this parameter with your account Public Validation-  Key.+To configure this module, you need to:++#. Go to Mailgun, create an account and validate your sending domain.+#. Go back to Odoo.+#. Go to *Settings > General Settings > Discuss > Enable mail tracking with Mailgun*.+#. Fill all the values. The only one required is the API key.+#. Optionally click *Unregister Mailgun webhooks* and accept.

Doing that automatically can suppose unpredictable behavior.

For example, you might not be adding a domain for mailgun and rely instead on web.base.url. web.base.url is not exposed in this dialog, so to change it you have to go to ICP section. If you do so, res.config.settings doesn't know about that change. Later, you go to a res.config.settings because you want to... say... configure B2B mode in your website. When you press save, we'll detect a change and apply the webhook updates. That may be more or less correct depending on who you ask, but in any case it's unpredictable.

In a similar fashion, you could change the mail.catchall.domain in this same dialog without expecting anything to change on mailgun configurations section. Again, a change there could trigger webhook calls, and that'd be unpredictable.

You could also want to register temporarily your sandbox domain webhooks without having to remove your main domain webhooks.

Or you could move from US API to EU API, in which case you need to manually unregister US webhooks first, then change API endpoint, and then register new webhooks. Or alternatively, you could decide to leave both webhooks online (although that would probably require another change in the module).

OTOH if you want to automate it, all you need to do is to call this method from your ansible playbook or equivalent. And if you prefer to configure it manually, the configuration is now self-explained and straightforward, as opposed to how it was before by dealing with ICPs and so forth. And this is still a huge enhancement as compared to what we had.

So, to avoid the cognitive load of having to think in all these scenarios while trying to understand an already quite complex module, it's better to not automate this.

Yajo

comment created time in a day

PullRequestReviewEvent

delete branch Tecnativa/e-commerce

delete branch : 13.0-website_sale_product_attachment-website_name

delete time in a day

delete branch Tecnativa/oca-addons-repo-template

delete branch : fix-precommit-python-version

delete time in a day

PR opened OCA/oca-addons-repo-template

[FIX] no ignore copier.yml

It's rather helpful to autoformat the main template file! 😃

But we can ignore a line with no problem.

+1 -1

0 comment

2 changed files

pr created time in a day

create barnchTecnativa/oca-addons-repo-template

branch : fix-no-ignore-copier-yml

created branch time in a day

push eventTecnativa/oca-addons-repo-template

Jairo Llopis

commit sha 2c2714cfaac805d9eebd98a401b73420744d660c

[IMP] process old stale issues/PRs first Fix https://github.com/OCA/oca-addons-repo-template/issues/67.

view details

Jairo Llopis

commit sha a8314d9d76eb14493caddf3e52e30609ed8652d5

[IMP] support Odoo 15.0 General chore to fix https://github.com/OCA/oca-addons-repo-template/issues/69. Some highlights: - Upgraded all possible pre-commit hooks, without introducing conflicts. - Upgraded dependencies used by the template itself. - Fixed pytest.ini to avoid conflicts with tests inside `maintainer-tools`, and make tests work out of the box in vscode. - Add test to assert that pre-commit hooks install properly on all versions. - Use python 3.8 for CI workflows in Odoo 15, as that is the version Odoo uses in their runbots. - Upgrade mandatory pylint-odoo checks as explained in https://github.com/OCA/oca-addons-repo-template/issues/69#issuecomment-932422962.

view details

Stéphane Bidoul

commit sha c41aae74512e190b89a598f7588cf065c84e1b49

Merge pull request #70 from Tecnativa/odoo15 [IMP] support Odoo 15.0

view details

Stéphane Bidoul

commit sha 865bb028b8ed295d8ea0bcb7352d9b7448d6ac00

Test with GitHub actions

view details

Stéphane Bidoul

commit sha 00ad2bebc8e1f07e636acbdc6b4ecd5915f1725b

Simplify github action test template

view details

Stéphane Bidoul

commit sha a3bd982dc37c45259c4a5997827fd0fb9bf2e61c

Name test steps

view details

Stéphane Bidoul

commit sha bd644e87125a7e860959f67cc642aa50a09cb83e

Handle rebel module group in GitHub actions

view details

Stéphane Bidoul

commit sha 15e7249f7253321408a069e2a43e75f5cdc3455c

odoo_version copier answer is a float...

view details

Stéphane Bidoul

commit sha 82d1a878a22163f14d511157c79e4d0e6fe34bb2

Improve git push of .pot files

view details

Stéphane Bidoul

commit sha f60ab800f0e2e0d83026cf9b8234ec439ed1817e

Check license and dev status before creating the db This only needs addons and their dependencies to be available.

view details

Stéphane Bidoul

commit sha f26e621bbabd1c783f46087e447cdf46f61dfab6

Add 15.0 images

view details

Stéphane Bidoul

commit sha fdaa081162b1f2be2f87f84fbf572228d943feb6

Move GitHub action template to src directory

view details

Stéphane Bidoul

commit sha 17025ec974463729c867fc1361f03bc22e1cf5a0

Run tests on GitHub actions on Odoo >= 15

view details

Stéphane Bidoul

commit sha 2407f596004436dabb72e2cf5b0339ae4dc05216

Merge pull request #61 from acsone/test-github-action Test with GitHub actions

view details

Stéphane Bidoul

commit sha 50a2e0e1ca79657af4852ca7631494023caf4630

Add question to select Travis or GitHub for CI

view details

Stéphane Bidoul

commit sha 5bd1f523a69e5589f1550eb534a017ea8f7998a1

Merge pull request #73 from acsone/ci-choice-sbi Add question to select Travis or GitHub for CI

view details

Stéphane Bidoul

commit sha 089d23cca6b53f71ddd4b8856ee4818f1a99ec7d

Rename .travis.yml to .t2d.yml if using GitHub actions

view details

Stéphane Bidoul

commit sha e1a9c3b3b12f97901a9e4b6693d71bd1e8560a5f

Merge pull request #74 from acsone/t2d-sbi Rename .travis.yml to .t2d.yml if using GitHub actions

view details

Stéphane Bidoul

commit sha f30ea60a2d33211e1febb162e17319e89e8002ce

Use setuptools-odoo 3.0.3 for Odoo >= 15

view details

Stéphane Bidoul

commit sha 5cea348797e800f8b5518001ecb1704fdcb774c4

Merge pull request #75 from acsone/setuptools_odoo-3.0.3 Use setuptools-odoo 3.0.3 for Odoo >= 15

view details

push time in a day

delete branch Tecnativa/e-commerce

delete branch : 12.0-website_sale_resource_booking

delete time in a day

Pull request review commentTecnativa/doodba

Use git-autoshare with git-aggregator

+#!/usr/bin/env python+# -*- coding: utf-8 -*-++"""Generates the appropiate configuration file for git-autoshare according to+user-defined settings through environment variables+"""++import os+from pathlib import Path++import yaml++GIT_AUTOSHARE_ORGS_TO_CACHE = os.environ.get(+    "GIT_AUTOSHARE_ORGS_TO_CACHE", "OCA,odoo,Tecnativa"+)+GIT_AUTOSHARE_CONFIG_DIR = os.environ.get(+    "GIT_AUTOSHARE_CONFIG_DIR", "/home/odoo/.config/git-autoshare/"+)+GIT_AUTOSHARE_CACHE_DIR = os.environ.get(+    "GIT_AUTOSHARE_CACHE_DIR", "/home/odoo/.cache/git-autoshare/"+)+UID = int(os.environ["UID"])+GID = int(os.environ["GID"])++orgs_to_cache = GIT_AUTOSHARE_ORGS_TO_CACHE.split(",")+git_autoshare_config_dir_path = Path(GIT_AUTOSHARE_CONFIG_DIR)+git_autoshare_config_path = git_autoshare_config_dir_path / "repos.yml"++if git_autoshare_config_path.is_file():+    exit(0)+else:+    git_autoshare_config_dir_path.mkdir(parents=True, exist_ok=True)+    os.chown(git_autoshare_config_dir_path.as_posix(), UID, GID)++git_autoshare_config = {"github.com": {"*": {"orgs": orgs_to_cache,}}}++with open(git_autoshare_config_path, "w") as f:+    f.write(yaml.dump(git_autoshare_config))+os.chown(git_autoshare_config_path.as_posix(), UID, GID)++# Ensure cache dir exists and has correct permissions+git_autoshare_cache_dir = Path(GIT_AUTOSHARE_CACHE_DIR)+git_autoshare_cache_dir.mkdir(parents=True, exist_ok=True)+os.chown(git_autoshare_cache_dir.as_posix(), UID, GID)
os.chown(str(git_autoshare_cache_dir), UID, GID)
joao-p-marques

comment created time in a day

Pull request review commentTecnativa/doodba

Use git-autoshare with git-aggregator

+#!/usr/bin/env python+# -*- coding: utf-8 -*-++"""Generates the appropiate configuration file for git-autoshare according to+user-defined settings through environment variables+"""++import os+from pathlib import Path++import yaml++GIT_AUTOSHARE_ORGS_TO_CACHE = os.environ.get(+    "GIT_AUTOSHARE_ORGS_TO_CACHE", "OCA,odoo,Tecnativa"+)+GIT_AUTOSHARE_CONFIG_DIR = os.environ.get(+    "GIT_AUTOSHARE_CONFIG_DIR", "/home/odoo/.config/git-autoshare/"+)+GIT_AUTOSHARE_CACHE_DIR = os.environ.get(+    "GIT_AUTOSHARE_CACHE_DIR", "/home/odoo/.cache/git-autoshare/"+)+UID = int(os.environ["UID"])+GID = int(os.environ["GID"])++orgs_to_cache = GIT_AUTOSHARE_ORGS_TO_CACHE.split(",")+git_autoshare_config_dir_path = Path(GIT_AUTOSHARE_CONFIG_DIR)+git_autoshare_config_path = git_autoshare_config_dir_path / "repos.yml"++if git_autoshare_config_path.is_file():+    exit(0)+else:+    git_autoshare_config_dir_path.mkdir(parents=True, exist_ok=True)+    os.chown(git_autoshare_config_dir_path.as_posix(), UID, GID)++git_autoshare_config = {"github.com": {"*": {"orgs": orgs_to_cache,}}}++with open(git_autoshare_config_path, "w") as f:+    f.write(yaml.dump(git_autoshare_config))+os.chown(git_autoshare_config_path.as_posix(), UID, GID)
os.chown(str(git_autoshare_config_path), UID, GID)
joao-p-marques

comment created time in a day

Pull request review commentTecnativa/doodba

Use git-autoshare with git-aggregator

+#!/usr/bin/env python+# -*- coding: utf-8 -*-++"""Generates the appropiate configuration file for git-autoshare according to+user-defined settings through environment variables+"""++import os+from pathlib import Path++import yaml++GIT_AUTOSHARE_ORGS_TO_CACHE = os.environ.get(+    "GIT_AUTOSHARE_ORGS_TO_CACHE", "OCA,odoo,Tecnativa"+)+GIT_AUTOSHARE_CONFIG_DIR = os.environ.get(+    "GIT_AUTOSHARE_CONFIG_DIR", "/home/odoo/.config/git-autoshare/"+)+GIT_AUTOSHARE_CACHE_DIR = os.environ.get(+    "GIT_AUTOSHARE_CACHE_DIR", "/home/odoo/.cache/git-autoshare/"+)+UID = int(os.environ["UID"])+GID = int(os.environ["GID"])++orgs_to_cache = GIT_AUTOSHARE_ORGS_TO_CACHE.split(",")+git_autoshare_config_dir_path = Path(GIT_AUTOSHARE_CONFIG_DIR)+git_autoshare_config_path = git_autoshare_config_dir_path / "repos.yml"++if git_autoshare_config_path.is_file():+    exit(0)+else:+    git_autoshare_config_dir_path.mkdir(parents=True, exist_ok=True)+    os.chown(git_autoshare_config_dir_path.as_posix(), UID, GID)++git_autoshare_config = {"github.com": {"*": {"orgs": orgs_to_cache,}}}++with open(git_autoshare_config_path, "w") as f:+    f.write(yaml.dump(git_autoshare_config))
    f.write(yaml.safe_dump(git_autoshare_config))
joao-p-marques

comment created time in a day

Pull request review commentTecnativa/doodba

Use git-autoshare with git-aggregator

+#!/usr/bin/env python+# -*- coding: utf-8 -*-++"""Generates the appropiate configuration file for git-autoshare according to+user-defined settings through environment variables+"""++import os+from pathlib import Path++import yaml++GIT_AUTOSHARE_ORGS_TO_CACHE = os.environ.get(+    "GIT_AUTOSHARE_ORGS_TO_CACHE", "OCA,odoo,Tecnativa"+)+GIT_AUTOSHARE_CONFIG_DIR = os.environ.get(+    "GIT_AUTOSHARE_CONFIG_DIR", "/home/odoo/.config/git-autoshare/"+)+GIT_AUTOSHARE_CACHE_DIR = os.environ.get(+    "GIT_AUTOSHARE_CACHE_DIR", "/home/odoo/.cache/git-autoshare/"+)+UID = int(os.environ["UID"])+GID = int(os.environ["GID"])++orgs_to_cache = GIT_AUTOSHARE_ORGS_TO_CACHE.split(",")+git_autoshare_config_dir_path = Path(GIT_AUTOSHARE_CONFIG_DIR)+git_autoshare_config_path = git_autoshare_config_dir_path / "repos.yml"++if git_autoshare_config_path.is_file():+    exit(0)+else:+    git_autoshare_config_dir_path.mkdir(parents=True, exist_ok=True)+    os.chown(git_autoshare_config_dir_path.as_posix(), UID, GID)++git_autoshare_config = {"github.com": {"*": {"orgs": orgs_to_cache,}}}++with open(git_autoshare_config_path, "w") as f:
with git_autoshare_config_path.open("w") as f:
joao-p-marques

comment created time in a day

Pull request review commentTecnativa/doodba

Use git-autoshare with git-aggregator

+#!/usr/bin/env python+# -*- coding: utf-8 -*-++"""Generates the appropiate configuration file for git-autoshare according to+user-defined settings through environment variables+"""++import os+from pathlib import Path++import yaml++GIT_AUTOSHARE_ORGS_TO_CACHE = os.environ.get(+    "GIT_AUTOSHARE_ORGS_TO_CACHE", "OCA,odoo,Tecnativa"+)+GIT_AUTOSHARE_CONFIG_DIR = os.environ.get(+    "GIT_AUTOSHARE_CONFIG_DIR", "/home/odoo/.config/git-autoshare/"+)+GIT_AUTOSHARE_CACHE_DIR = os.environ.get(+    "GIT_AUTOSHARE_CACHE_DIR", "/home/odoo/.cache/git-autoshare/"+)+UID = int(os.environ["UID"])+GID = int(os.environ["GID"])++orgs_to_cache = GIT_AUTOSHARE_ORGS_TO_CACHE.split(",")+git_autoshare_config_dir_path = Path(GIT_AUTOSHARE_CONFIG_DIR)+git_autoshare_config_path = git_autoshare_config_dir_path / "repos.yml"++if git_autoshare_config_path.is_file():+    exit(0)+else:+    git_autoshare_config_dir_path.mkdir(parents=True, exist_ok=True)+    os.chown(git_autoshare_config_dir_path.as_posix(), UID, GID)
    os.chown(str(git_autoshare_config_dir_path), UID, GID)
joao-p-marques

comment created time in a day