Conversation
Summary of ChangesHello @mmathieum, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the setup composite action in the GitHub workflow. The changes introduce new inputs, add logic to set environment variables based on the repository context, and conditionally run steps based on these variables. The changes improve the flexibility and logging of the action. I've found a few areas for improvement regarding code clarity, maintainability, and idiomatic usage of GitHub Actions syntax. Specifically, I've suggested simplifying a long conditional, fixing a typo in a log message, and using a more concise syntax for a boolean check.
.github/actions/setup/action.yml
Outdated
| - name: MT set environement variables | ||
| shell: bash | ||
| run: | | ||
| MT_IS_SUBMODULE=${{ github.repository == 'mtransitapps/commons' || github.repository == 'mtransitapps/commons-java' || github.repository == 'mtransitapps/parser' || github.repository == 'mtransitapps/commons-android' }} |
There was a problem hiding this comment.
The condition to check if the repository is a submodule is quite long and can be hard to read and maintain. You can simplify this by using the contains and fromJSON functions available in GitHub Actions expressions. This makes the list of repositories easier to manage.
MT_IS_SUBMODULE=${{ contains(fromJSON('["mtransitapps/commons", "mtransitapps/commons-java", "mtransitapps/parser", "mtransitapps/commons-android"]'), github.repository) }}
.github/actions/setup/action.yml
Outdated
| REPOSITORY_OWNER_AND_NAME=${{ github.repository }}; | ||
| REPOSITORY_NAME=$(basename $REPOSITORY_OWNER_AND_NAME); | ||
| echo "Checking our this repo '$REPOSITORY_NAME' workflow sha '$MT_SHA':" | ||
| echo "[MT] > Checking our this repo '$REPOSITORY_NAME' workflow sha '$MT_SHA':" |
mt-sync-code-dataworkflow on PRs with automatic skip of data download and app release commons#539