Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] github_connector: Migration to 17.0 #128

Merged
merged 67 commits into from
Nov 8, 2024

Conversation

victoralmau
Copy link
Member

@victoralmau victoralmau commented Nov 8, 2024

Migration to 17.0

Please @pedrobaeza can you review it?

@Tecnativa TT51638

legalsylvain and others added 30 commits November 8, 2024 09:26
…hod.

[FIX] Add the organization_id.github_login to the github url

Making the github url the form: https://github.com/OCA/account-analytic/tree/9.0
and not the https://github.com/account-analytic/tree/9.0 before this commit

[IMP] Make travis happy

[IMP] Fix error with teams sync

We already have the organization in the team data,
and github does not provide anymore in the result for the
team data.
[IMP] robustness courtesy @astirpe

[FIX] warning message, courtesy @lasley and @astirpe

[FIX] typo

[UPD] add V11 serie in demo data

[FIX] various

typo

[REF] rename milestone into serie courtesy @sbidoul
[IMP] raise error instead of logging in case of duplicates

To avoid creating additional duplicates.
[FIX] add ondelete cascade
[FIX] team creation from odoo
[FIX] possibility to recursively load an existing object
[REF] github_connector: Fix typo "should not => does not" (OCA#6)
[FIX] github_connector: remove duplicated group
* Fixed JSON response parsing issue while fetching data by URL
* [IMP] Add try-except on branch analyze action

Add try-except statements on analyze actions that could
potentially crash the analyze process.

* [REF] Fix error logging

Changes include:
 - fix error values
 - use error instead of warning

* [IMP] Fix error in analyze call

Fix a programming mistake in the analyze call.
By @RoelAdriaans

* [IMP] Bump version number of github_connector

Bump the version number of github_connector to '11.0.1.1.1'.

* [IMP] Bump version number of github_connector

Bump the version number of github_connector_odoo to
'11.0.1.1.1'.
To play nice with Sentry.
[FIX] github_connector: keyerror 'blog'

Description of the issue/feature this PR addresses:

On new database error when syncing new github organization (example: OCA).
Error traceback: KeyError: 'blog'

Current behavior before PR:

Synchronization gets blog key on `get_odoo_data_from_github` but blog field does not exist.
When it tries to match the key with model attribute we get key error.

Desired behavior after PR is merged:

Get blog key from github data and show it on form view.
If source path does not exists before adding it to modules path, styles
on website are corrupted, making impossible load them from assets.
There's a mix between self and branch arguments in analyze methods.
…functional

This field allows to define where addons are located, but it's hidden right now, because
not everything is properly adjusted for paths different from root.

Making this working, there's no need to hide the field.
linter

Linter

Linter

default value to empty string in get()'s

secure the code

improvment of the code

coding style

coding style
Using os.command gets hung when there's a problem deleting the folder (for example,
when no permissions), so this stucks the cron method or the manual process of
updating source code.

We avoid it using the Python utility for that through shutil.

We also avoid an exception in that case enclosing the sentence in a try/except clause.
victoralmau and others added 8 commits November 8, 2024 09:26
… error

{'github_create_date': datetime.datetime(2014, 9, 10, 13, 3, 33, tzinfo=tzlocal())}

ValueError: Datetime field expects a naive datetime: 2014-09-10 13:03:33+00:00

Necessary since PyGithub/PyGithub@0177f7c
Do not create lines if no file has been scanned
[UPD] Update github_connector.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: interface-github-16.0/interface-github-16.0-github_connector
Translate-URL: https://translation.odoo-community.org/projects/interface-github-16-0/interface-github-16-0-github_connector/
Translated using Weblate (Italian)

Currently translated at 100.0% (199 of 199 strings)

Translation: interface-github-16.0/interface-github-16.0-github_connector
Translate-URL: https://translation.odoo-community.org/projects/interface-github-16-0/interface-github-16-0-github_connector/it/
@victoralmau victoralmau force-pushed the 17.0-mig-github_connector branch 2 times, most recently from 278ce90 to 4d989c6 Compare November 8, 2024 09:50
@pedrobaeza
Copy link
Member

/ocabot migration github_connector

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Nov 8, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 8, 2024
2 tasks
github_connector/models/github_repository.py Outdated Show resolved Hide resolved
Copy link

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a minor change if possible

github_connector/models/github_repository_branch.py Outdated Show resolved Hide resolved
@victoralmau victoralmau force-pushed the 17.0-mig-github_connector branch from 67fda30 to 9c7db57 Compare November 8, 2024 16:05
@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-128-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit c5c7e08 into OCA:17.0 Nov 8, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 329cd39. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 17.0-mig-github_connector branch November 8, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.