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

Upgrade Lunaria and add Action #1768

Merged
merged 5 commits into from
Apr 23, 2024
Merged

Upgrade Lunaria and add Action #1768

merged 5 commits into from
Apr 23, 2024

Conversation

yanthomasdev
Copy link
Member

Description

This PR updates our Lunaria version to the latest version and adds its brand-new GitHub Action to the repository.

Now, all PRs that affect translations (source content changes, translation PRs) will receive a comment with a few insights, like these:

Screenshot of GitHub comment by "astrobot-houston" showcasing the Action, the comment includes a paragraph explaining the PR will trigger status changes and a table of tracked files with a note and locale

I've tested the Action before in a fork, so things are not supposed to blow up🤞 - More info on: GitHub Action - Lunaria Docs

Copy link

changeset-bot bot commented Apr 18, 2024

⚠️ No Changeset found

Latest commit: ca1f6a1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Apr 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Apr 22, 2024 9:31pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
starlight-i18n ⬜️ Ignored (Inspect) Apr 22, 2024 9:31pm

@github-actions github-actions bot added 🚨 action Changes to GitHub Action workflows 📚 docs Documentation website changes labels Apr 18, 2024
@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Apr 18, 2024

size-limit report 📦

Path Size
/index.html 6.1 KB (0%)
/_astro/*.js 21.57 KB (0%)
/_astro/*.css 13.45 KB (0%)

Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

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

Amazing, super impatient to try it out!

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Looks fantastic @yanthomasdev! So excited to have this here having already admired it in docs — left two small comments, but apart from this, LGTM!

.github/workflows/lunaria.yml Show resolved Hide resolved
shell: bash

- name: Generate Lunaria Overview
uses: yanthomasdev/lunaria-action
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a version number here? That way we don’t get caught out if the Lunaria action is updated in a breaking way.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we're actually missing the @main here to target the branch. Currently, there are no "versions" for the Action since it interacts with the Lunaria version present in the repo itself, it does use some of Lunaria APIs but those are very unlikely to have breaking changes anytime soon.

Copy link
Member

Choose a reason for hiding this comment

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

An alternative until the action is versioned could be to use a specific SHA maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could do this as well if we want to be extra cautious. One thing that makes me opt for a branch is also being able to update with new features without having to update the branch in all the repos

Copy link
Member

Choose a reason for hiding this comment

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

Yeah the branch doesn’t buy us much protection from breaking changes or (worst case scenario) dangerous code being pushed to main in Lunaria. I think tying to SHA like HiDeoo suggested makes sense here.

It might seem counterintuitive but sometimes some friction can be good here. For example, let’s say you decide Lunaria needs some change that will improve things, but break the current action config — maybe it now needs some new option, or something changed name etc. If everyone is using the unqualified action, you now have a situation where you know pushing that change will break everyone and your only way to avoid that would be to proactively go and 1) lock all users to the current version with PRs, 2) then merge your breaking changes, then finally 3) unlock those users again to upgrade with new PRs.

Following a versioned release flow (or in its absence using a SHA) means users can intentionally upgrade and you can iterate knowing you won’t be causing chaos. (Long term proper semantic versioning is the best of both worlds: breaking change protection PLUS timely updates for safe changes.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Made it a SHA, let me know if we're good

Copy link
Member

Choose a reason for hiding this comment

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

Also sharing here if it can helps, as I personally always found the actions recommended release strategy using moving git tags to be a bit tedious, this action to help with this by automatically moving the tags.

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes @yanthomasdev — excited to see this in action! 🚀 🌚

@delucis delucis merged commit be258c6 into main Apr 23, 2024
9 checks passed
@delucis delucis deleted the lunaria-upgrade-and-action branch April 23, 2024 08:04
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Apr 30, 2024
* main:
  Update fa.json (withastro#1793)
  i18n(fr): update `resources/community-content.mdx` (withastro#1795)
  [ci] format
  i18n(ko-KR): update `community-content.mdx` (withastro#1794)
  [ci] format
  Adds Starlight in Next.js project video (withastro#1789)
  [ci] format
  i18n(ru): update translations (withastro#1783)
  i18n(id): Update getting-started.mdx (withastro#1778)
  Upgrade Lunaria and add Action (withastro#1768)
  [ci] format
  i18n(es): update `sidebar` (withastro#1767)
  i18n(pt-br): Update `getting-started.mdx` (withastro#1776)
  i18n(es): update `configuration` (withastro#1766)
  [ci] format
  Add TrueCharts to showcases (withastro#1773)
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Apr 30, 2024
* main: (21 commits)
  Update fa.json (withastro#1793)
  i18n(fr): update `resources/community-content.mdx` (withastro#1795)
  [ci] format
  i18n(ko-KR): update `community-content.mdx` (withastro#1794)
  [ci] format
  Adds Starlight in Next.js project video (withastro#1789)
  [ci] format
  i18n(ru): update translations (withastro#1783)
  i18n(id): Update getting-started.mdx (withastro#1778)
  Upgrade Lunaria and add Action (withastro#1768)
  [ci] format
  i18n(es): update `sidebar` (withastro#1767)
  i18n(pt-br): Update `getting-started.mdx` (withastro#1776)
  i18n(es): update `configuration` (withastro#1766)
  [ci] format
  Add TrueCharts to showcases (withastro#1773)
  i18n(zh-cn): Update `sidebar.mdx` (withastro#1761)
  i18n(ko-KR): update `sidebar.mdx` (withastro#1760)
  i18n(fr): update `guides/sidebar` (withastro#1758)
  test: fix Windows path separator test issues (withastro#1759)
  ...
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Apr 30, 2024
* main: (63 commits)
  Add translation for copy button (withastro#1788)
  Update astro-expressive-code (withastro#1720)
  Fix type inference for extended i18n schemas (withastro#1786)
  Fix TypeScript schema error when using project references (withastro#1777)
  Update fa.json (withastro#1793)
  i18n(fr): update `resources/community-content.mdx` (withastro#1795)
  [ci] format
  i18n(ko-KR): update `community-content.mdx` (withastro#1794)
  [ci] format
  Adds Starlight in Next.js project video (withastro#1789)
  [ci] format
  i18n(ru): update translations (withastro#1783)
  i18n(id): Update getting-started.mdx (withastro#1778)
  Upgrade Lunaria and add Action (withastro#1768)
  [ci] format
  i18n(es): update `sidebar` (withastro#1767)
  i18n(pt-br): Update `getting-started.mdx` (withastro#1776)
  i18n(es): update `configuration` (withastro#1766)
  [ci] format
  Add TrueCharts to showcases (withastro#1773)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 action Changes to GitHub Action workflows 📚 docs Documentation website changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants