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

Introduce a GitHub Action That Sends a Message to a PR to Notify i18n Tasks. #574

Merged
merged 4 commits into from
Apr 4, 2024

Conversation

hhiroshell
Copy link
Contributor

@hhiroshell hhiroshell commented Mar 6, 2024

This PR adds a GitHub Action that sends a message to a PR to notify i18n tasks following the discussion in #537 .

Background

Currently, when adding English content (files under website/content/en/ ), we place a copy in the corresponding directories of other languages. This approach ensures that if there is no translated version available when browsing in different languages, the English content is displayed. Additionally, when updates are made, the same changes need to be applied to the corresponding files in other languages.

Our website's i18n support is relatively new, so this task is often overlooked. To prevent such oversights, This PR introduces a GitHub Action that would serve as a reminder.

To reviewers

At the time of opening this PR, the GitHub Action implementation is still in draft, but I would appreciate your feedback on the following points:

  • It detects changes under website/content/en and the targets of symbolic links; is there any other area that should be covered?
  • Is the content of the message appropriate?

Related Issues and PRs

Signed-off-by: Hiroshi Hayakawa <hhiroshell@gmail.com>
Copy link

netlify bot commented Mar 6, 2024

Deploy Preview for tag-app-delivery canceled.

Name Link
🔨 Latest commit c51c42c
🔍 Latest deploy log https://app.netlify.com/sites/tag-app-delivery/deploys/65fb07adfc25e0000856b035

@hhiroshell
Copy link
Contributor Author

hhiroshell commented Mar 6, 2024

The GitHub Action appears to be non-functional, possibly because this PR was created from a forked repository.

I will do a demo on this PR once the problem is resolved. Please wait! 🙏

Signed-off-by: Hiroshi Hayakawa <hhiroshell@gmail.com>
Signed-off-by: Hiroshi Hayakawa <hhiroshell@gmail.com>
@hhiroshell
Copy link
Contributor Author

hhiroshell commented Mar 8, 2024

The problem has been resolved...! But, I cannot demonstrate it on this PR for some reason (*).
I have run the same thing here, so please take a look at that.

*)
I've made the GitHub Action is triggered by on.pull_request_target. it is necessary to grant GitHub Action the permission to post messages when a PR is created from a fork.

Additionally, on.pull_request_target causes the GitHub Action to run within the context of the base branch. And there are no GitHub Action files in the base branch. For this reason, I was unable to demonstrate it on this PR.

Signed-off-by: Hiroshi Hayakawa <hhiroshell@gmail.com>
Copy link
Collaborator

@abangser abangser left a comment

Choose a reason for hiding this comment

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

👏 Well done @hhiroshell, thanks so much for this! I am sure we will learn more as we go, but this seems like a great start for us including both the logic and the wording.

@lianmakesthings
Copy link
Collaborator

lianmakesthings commented Apr 3, 2024

@hhiroshell are you able to demonstrate the working Action on your own repo or in some other way?

@hhiroshell
Copy link
Contributor Author

hhiroshell commented Apr 4, 2024

@lianmakesthings I've demonstrated it in my own repository. please take a look below.
hhiroshell#5

@lianmakesthings
Copy link
Collaborator

Thanks @hhiroshell, great work! 👏

@lianmakesthings lianmakesthings merged commit 56418e0 into cncf:main Apr 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants