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

Workflow for *.pot sync exits if only creation dates were changed #1032

Merged

Conversation

kontura
Copy link
Contributor

@kontura kontura commented Nov 22, 2023

Otherwise the dnf5-l10n repo might contain mostly empty commits.

@kontura kontura requested a review from m-blaha November 22, 2023 06:44
@kontura kontura marked this pull request as ready for review November 22, 2023 06:44
@@ -38,6 +38,10 @@ jobs:
git config --global user.name "GitHub Workflow"
git config --global user.email "[email protected]"
pushd src

# If only creation dates were changed do nothing
if git diff --ignore-matching-lines='"POT-Creation-Date:' --exit-code; then exit 0; fi
Copy link
Member

Choose a reason for hiding this comment

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

Here, we check whether there is a change in the source (dnf5) repository.

Wouldn't it be better to verify if the change about to be committed to the weblate repository (dnf5-l10n) is reasonable (contains any other change than the creation date)? I mean to move the test after git -C l10n add "*" line and check the --staged diff (to cover also newly added files).
This way we ensure that after the workflow run, the weblate repo contains correct *.pot files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is better, I have updated it. 👍

Otherwise the dnf5-l10n repo might contain mostly empty commits.
@kontura kontura force-pushed the pot_sync_only_on_change branch from 5187244 to ccece43 Compare November 22, 2023 09:26
Copy link
Member

@m-blaha m-blaha left a comment

Choose a reason for hiding this comment

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

Thank you!

@m-blaha m-blaha added this pull request to the merge queue Nov 22, 2023
Merged via the queue into rpm-software-management:main with commit d6053a7 Nov 22, 2023
5 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants