-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into backend-changes-feedback-form-EJ
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from sde_collections.models.collection import Collection | ||
from sde_collections.models.collection_choice_fields import WorkflowStatusChoices | ||
from sde_collections.utils.github_helper import GitHubHandler | ||
|
||
|
||
def push_curated_collections_to_github(): | ||
# Filter collections with a specific workflow status (CURATED) | ||
collections = Collection.objects.filter( | ||
workflow_status=WorkflowStatusChoices.CURATED | ||
) | ||
|
||
# Initialize the GitHub handler and push collections | ||
github_handler = GitHubHandler(collections) | ||
github_handler.push_to_github() | ||
print( | ||
"Curated collections with a workflow status of CURATED have been pushed to GitHub." | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
push_curated_collections_to_github() |