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

Cronjob #531

Merged
merged 3 commits into from
Nov 5, 2023
Merged

Cronjob #531

merged 3 commits into from
Nov 5, 2023

Conversation

to-sta
Copy link
Collaborator

@to-sta to-sta commented Nov 4, 2023

Contributor checklist


Description

Cronjob workflow for the find repeat i18n values python script. I gave it a test run with act.

@andrewtavis
The workflow does not fail. I think we could automatically create an issue with the result (I think that should be possible 😅) or have conditionals in the workflow. Let me know what you think would be useful, than we can add this functionally to the workflow.

The script is set to run at 6pm, every 14 days on a Monday.

Copy link

netlify bot commented Nov 4, 2023

Deploy Preview for activist-org canceled.

Name Link
🔨 Latest commit 84566eb
🔍 Latest deploy log https://app.netlify.com/sites/activist-org/deploys/654769cfa0bff80008f12b7e

Copy link
Contributor

github-actions bot commented Nov 4, 2023

Thank you for the pull request!

The activist team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Development rooms once you're in. It'd be great to have you!

Maintainer checklist

  • The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution

    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local activist repo
  • The TypeScript and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis
Copy link
Member

What about running this on PRs, @to-sta? Definitely opening an issue automatically would be cool!

@andrewtavis
Copy link
Member

The thing is, say there's a big change to the codebase that we merge and then i18n needs to do some work right after. If we wait for 10+ days the repeats would be potentially annoying multiple people. Sorry if I didn't get this fully in the sync (long day 😅). Let me know what you think!

@to-sta
Copy link
Collaborator Author

to-sta commented Nov 4, 2023

The thing is, say there's a big change to the codebase that we merge and then i18n needs to do some work right after. If we wait for 10+ days the repeats would be potentially annoying multiple people. Sorry if I didn't get this fully in the sync (long day 😅). Let me know what you think!

I thought running this on every PR might be excessive. I believe that if we run this on every PR, we might end up running this script too often without creating value.

What we could do instead is run this script only when certain files are changed.

Here is an example on .js files.

on:
  pull_request:
    paths:
      - '**.js'

We could target the en-US.json file and run the script whenever it changes.

@andrewtavis
Copy link
Member

This is exactly what we should do, @to-sta! 😊 The magic of coding 🌈✨😇 Do you want to send along the change for that and we can merge it in? I'll be editing the JSON tomorrow or the next day and we can then see that it passes when they're all unique.

@to-sta
Copy link
Collaborator Author

to-sta commented Nov 5, 2023

This is exactly what we should do, @to-sta! 😊 The magic of coding 🌈✨😇 Do you want to send along the change for that and we can merge it in? I'll be editing the JSON tomorrow or the next day and we can then see that it passes when they're all unique.

Switched from a cronjob to targeting the file directly. I also added push besides pull_request to catch changes that you commit directly.

I still want to improve this a bit. The workflow will not fail, because we are not raising an error inside the python file or have a condition in the workflow. So we have to check the workflow run to see what has changed. Automatically creating an issue would make sense here (but consecutive commits would create a lot of Issues 😆).

Let's improve this in another Issue 😄.

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

Really great, @to-sta! I'll try to send along the i18n updates soon so we can test this :)

@andrewtavis andrewtavis merged commit dc4f0d6 into activist-org:main Nov 5, 2023
6 checks passed
@to-sta to-sta deleted the cronjob branch April 21, 2024 10:23
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.

2 participants