-
-
Notifications
You must be signed in to change notification settings - Fork 878
[#4670]Add bi-directional sync feature #4765
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
base: master
Are you sure you want to change the base?
Conversation
Here is a video description of the feature : |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4765 +/- ##
==========================================
- Coverage 91.90% 90.09% -1.82%
==========================================
Files 85 88 +3
Lines 7142 7531 +389
==========================================
+ Hits 6564 6785 +221
- Misses 578 746 +168
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This PR in tackling issue #4760, enables syncing Challenge and Challenge Phase updates made via the EvalAI UI to the configured GitHub repository/branch. When a supported field changes in the UI, a corresponding commit is made to the repo to keep configuration in sync.
EvalAI-Starters side : Cloud-CV/EvalAI-Starters#129
How it works
apps/challenges/models.py
:challenge_details_sync
forChallenge
challenge_phase_details_sync
forChallengePhase
update_fields
or infers it from the request payload keys to make a minimal, single-field commit.challenges.github_utils
sync helpers to apply changes on GitHub.Safeguards
github_repository
,github_branch
, andgithub_token
to be set onChallenge
.Configuration
Challenge
:github_repository
(e.g., org/repo)github_branch
(defaults handled in code)github_token
(PAT with repo access)Migrations
0113_add_github_branch_field_and_unique_constraint.py
now:github_branch
if missing (SQL)github_repository
,github_branch
) when both are non-empty0116_challenge_github_branch.py
so there’s a single source of truth.Django signals
challenge_details_sync
onChallenge
(post_save
)challenge_phase_details_sync
onChallengePhase
(post_save
)github_repository
andgithub_token
are set.update_fields
or inferred request payload keys.challenges.github_utils
.GitHubSyncMiddleware
POST/PUT/PATCH
, extracts JSON or form keys into a thread-local store.Dependencies
requirements/common.txt
to support GitHub API calls used byapps/challenges/github_interface.py
and related utilities.