sillsdev / SpeechAnalyzer

SIL Speech Analyzer is a Windows program for acoustic analysis of speech sounds.
https://software.sil.org/speech-analyzer/
7 stars 3 forks source link

feat: Create parse-langtags.yml #40

Closed darcywong00 closed 3 years ago

darcywong00 commented 3 years ago

Fixes #30 by creating a GA that gets the latest langtags.json to update iso639.txt.

(updated description) Since the langtags.json source doesn't get updated often, this GA has a cron trigger ~for 6 months~ each week and can also be manually triggered.

The GA will

megahirt commented 3 years ago

@darcywong00 you've done some great work here! I am hesitant to suggest re-working this when you've already got something great already working.

In the process of reviewing this PR, I started looking into auto-creating a PR based upon the branch. I stumbled upon https://github.com/marketplace/actions/create-pull-request which looks like an all-in-one solution including committing on a branch and creating a PR. It also has some good detection logic for simply exiting and not committing if there are no changes.

So I was wondering if we could re-work this using the action above and put it on schedule (once a day or a few times a week).

Here is the default behavior of the action as stated in their documentation:

How the action behaves:

  • If there are changes (i.e. a diff exists with the checked-out base branch), the changes will be pushed to a new branch and a pull request created.
  • If there are no changes (i.e. no diff exists with the checked-out base branch), no pull request will be created and the action exits silently.
  • If a pull request already exists and there are no further changes (i.e. no diff with the current pull request branch) then the action exits silently.
  • If a pull request exists and new changes on the base branch make the pull request unnecessary (i.e. there is no longer a diff between the pull request branch and the base), the pull request is automatically closed. Additionally, if delete-branch is set to true the branch will be deleted.

If we achieve this, I would actually show this off as it's the first instance of a PR bot updating language tags in SIL software that I know of.

darcywong00 commented 3 years ago

Ok. I've updated the GA to trigger manually, or cron every 6 months (that should be enough to bring in WS tech changes). If there's changes, it'll auto-generate a PR (see the ones I've closed).

This PR description updated to reflect the latest behavior