-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Added trigger dependent repo update workflow #8389
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughA new GitHub Actions workflow named "Trigger Dependent Repo Update Workflow" has been created. It is designed to be triggered manually or upon pushes to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/trigger-dependent-repo-update.yml (1 hunks)
Additional comments not posted (4)
.github/workflows/trigger-dependent-repo-update.yml (4)
1-7
: LGTM: Workflow name and triggers are well-defined.The workflow name is descriptive, and the triggers (manual and push to master) are appropriate for the intended purpose of updating dependent repositories.
8-11
: LGTM: Job setup is appropriate.The job named "trigger" running on ubuntu-latest is a standard and suitable setup for this workflow.
1-26
: Overall, the workflow is well-designed and achieves its purpose.This new workflow effectively triggers updates in dependent repositories when changes are pushed to the master branch or manually initiated. It uses secure token generation and provides relevant metadata to the dependent repository.
A few points to consider:
- Ensure all required secrets are properly set in the repository settings.
- Consider making the organization name configurable for improved flexibility.
These minor adjustments will enhance the robustness and reusability of the workflow.
12-19
: LGTM: Secure token generation using GitHub App authentication.The token generation step is well-implemented using the GitHub App authentication method.
Please ensure that the following secrets are properly set in the repository settings:
- CVAT_BOT_APP_ID
- CVAT_BOT_PRIVATE_KEY
- CVAT_DEPENDENT_REPO
You can verify the existence of these secrets by running the following script:
- name: Trigger repository dispatch | ||
uses: peter-evans/repository-dispatch@v3 | ||
with: | ||
token: ${{ steps.gen-token.outputs.token }} | ||
repository: cvat-ai/${{ secrets.CVAT_DEPENDENT_REPO }} | ||
event-type: dependency_updated | ||
client-payload: '{"triggered_by": "${{ github.repository }}", "commit_sha": "${{ github.sha }}", "branch": "${{ github.ref }}"}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with suggestion: Repository dispatch step is well-implemented.
The repository dispatch step correctly triggers an update in the dependent repository with relevant metadata.
Consider making the organization name configurable instead of hardcoding 'cvat-ai'. This would make the workflow more flexible and reusable. You can achieve this by using a secret or an environment variable. Here's a suggested change:
- repository: cvat-ai/${{ secrets.CVAT_DEPENDENT_REPO }}
+ repository: ${{ secrets.CVAT_ORGANIZATION }}/${{ secrets.CVAT_DEPENDENT_REPO }}
Don't forget to add the CVAT_ORGANIZATION
secret to your repository settings if you implement this change.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- name: Trigger repository dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ steps.gen-token.outputs.token }} | |
repository: cvat-ai/${{ secrets.CVAT_DEPENDENT_REPO }} | |
event-type: dependency_updated | |
client-payload: '{"triggered_by": "${{ github.repository }}", "commit_sha": "${{ github.sha }}", "branch": "${{ github.ref }}"}' | |
- name: Trigger repository dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ steps.gen-token.outputs.token }} | |
repository: ${{ secrets.CVAT_ORGANIZATION }}/${{ secrets.CVAT_DEPENDENT_REPO }} | |
event-type: dependency_updated | |
client-payload: '{"triggered_by": "${{ github.repository }}", "commit_sha": "${{ github.sha }}", "branch": "${{ github.ref }}"}' |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8389 +/- ##
===========================================
+ Coverage 83.56% 83.60% +0.03%
===========================================
Files 396 397 +1
Lines 41830 41906 +76
Branches 3881 3883 +2
===========================================
+ Hits 34955 35034 +79
+ Misses 6875 6872 -3
|
Quality Gate passedIssues Measures |
Motivation and context
How has this been tested?
Checklist
develop
branch(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
master
branch, enhancing integration and communication between repositories.