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

Add workflows to track outdated terms #1360

Merged
merged 2 commits into from
Oct 19, 2022

Conversation

yunkon-kim
Copy link
Collaborator

Signed-off-by: Yunkon Kim hermitkim1@gmail.com

Describe your changes

  • This PR will add 2 workflows to check outdated terms.

    • check-outdated-terms.yaml
    • post-outdated-terms-report.yaml
  • The check-outdated-terms workflow has the following steps:

    1. Set up environment variables for the target L10n team
    2. Checkout
    3. Check outdated
    4. Upload output
  • The post-outdated-terms-report has the following steps:

    1. Show the github context (temporarily for debug)
    2. Download output
    3. Set up environment variables from the output
    4. Generate a report markdown
    5. Create an issue from the report (with outdated, good first issue, and lang/xx labels)

  • For the time being, I'd like to test and troubleshoot 2 workflows in the Korean localization team.
  • The workflows will be triggered on a PR event targeting the dev-ko branch.
  • When it is stable, we plan to share the workflows for other teams to use.
  • Please refer to the Discussion link for details 😃

Related issue number or link (ex: resolves #issue-number)

Checklist before opening this PR (put x in the checkboxes)

  • This PR does not contain plagiarism
    • don’t copy other people’s work unless you are quoting and contributing it to them.
  • I have signed off on all commits
    • signing off (ex: git commit -s) is to affirm that commits comply DCO. If you are working locally, you could add an alias to your gitconfig by running git config --global alias.ci "commit -s".

- Add check-outdated-terms.yaml
- Add post-outdated-terms-report.yaml

Signed-off-by: Yunkon Kim <hermitkim1@gmail.com>
@yunkon-kim yunkon-kim added lang/ko for Korean maintainers Use this label if PR requires maintainers to take action labels Oct 11, 2022
@netlify
Copy link

netlify bot commented Oct 11, 2022

Deploy Preview for cncfglossary ready!

Name Link
🔨 Latest commit 1721fd9
🔍 Latest deploy log https://app.netlify.com/sites/cncfglossary/deploys/634e6890ea7e6400098b2857
😎 Deploy Preview https://deploy-preview-1360--cncfglossary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Collaborator

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

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

@yunkon-kim
Thank you for the contribution !!

echo "(DEBUG) Original file path: ./content/en/${FILE_NAME}"

# Actually compare between the old and lastest English terms and log diff in the file
git diff ${OLD_BRANCH}..${LATEST_BRANCH} -- ./content/en/${FILE_NAME} > ./outdated/${FILE_NAME}
Copy link
Collaborator

Choose a reason for hiding this comment

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

what if there is no matched file name ?
(if the file name of source English file name has been changed?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@seokho-son thank you for this helpful question.

Based on a list of localized files, this workflow will check if the source English is outdated or not. This workflow cannot detect changing file names.

To handle this, I could use the following command.

Suggested change
git diff ${OLD_BRANCH}..${LATEST_BRANCH} -- ./content/en/${FILE_NAME} > ./outdated/${FILE_NAME}
git diff ${OLD_BRANCH}..${LATEST_BRANCH} -- ./content/en/ > ./outdated/20221018_changes.diff

This command will output the entire change, not individual changes. I expect a long report will be posted, and an l10n approver must review all changes and pick out the localized ones.

Although l10n approvers work increases, this seems to be the more accurate way.

Is this an appropriate answer to your question? 😃

Copy link
Collaborator

Choose a reason for hiding this comment

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

@yunkon-kim
I think an error handling is enough at this phase.
If there is no matched file from English source (in ./content/en/*), this workflow may report the situation as well. (e.g., "there is no matched file for /ko/xxx.md . Need to check changed or removed source file")

Copy link
Collaborator Author

@yunkon-kim yunkon-kim Oct 18, 2022

Choose a reason for hiding this comment

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

@seokho-son thanks for your opinion.

I applied your opinion and made another update commit. You can see a test result: yunkon-kim/test-on-github-actions#100

Signed-off-by: Yunkon Kim <hermitkim1@gmail.com>
Copy link
Collaborator

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

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

Hi @yunkon-kim

I think this PR is ready for testing. (within Korean team only)
Thanks for your hard work!!

@seokho-son
Copy link
Collaborator

PTAL @jihoon-seo

Copy link
Collaborator

@jihoon-seo jihoon-seo left a comment

Choose a reason for hiding this comment

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

lgtm! Thank you @yunkon-kim !

@jihoon-seo jihoon-seo merged commit 4f9eb4f into cncf:main Oct 19, 2022
mdf-ido pushed a commit to mdf-ido/glossary that referenced this pull request Oct 31, 2022
Signed-off-by: Yunkon Kim <hermitkim1@gmail.com>
@yunkon-kim yunkon-kim deleted the workflows-to-track-outdated-terms branch February 10, 2023 10:20
seokho-son pushed a commit to seokho-son/glossary that referenced this pull request Mar 20, 2023
Signed-off-by: Yunkon Kim <hermitkim1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/ko for Korean maintainers Use this label if PR requires maintainers to take action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants