-
Notifications
You must be signed in to change notification settings - Fork 15
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
Automate Gitea mirror creation #1996
Labels
enhancement
New functionality that should be added to the Safe Haven
Milestone
Comments
It looks like the API call we want to create a mirror is repoMigrate |
I made a little script to test this #!/usr/bin/env sh
http --auth "$1":"$2" localhost:3000/api/v1/repos/migrate clone_addr="$4" repo_name="$3" ❯ ./create_mirror.sh jim password dotfiles https://github.com/JimMadge/dotfiles
HTTP/1.1 201 Created
Cache-Control: max-age=0, private, must-revalidate, no-transform
Content-Type: application/json;charset=utf-8
Date: Tue, 09 Jul 2024 10:40:56 GMT
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
{
"allow_fast_forward_only_merge": true,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_rebase_update": true,
"allow_squash_merge": true,
"archived": false,
"archived_at": "1970-01-01T01:00:00+01:00",
"avatar_url": "http://localhost:3000/",
"clone_url": "http://localhost:3000/jim/dotfiles.git",
"created_at": "2024-07-09T11:40:53+01:00",
"default_allow_maintainer_edit": false,
"default_branch": "main",
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"description": "",
"empty": false,
"fork": false,
"forks_count": 0,
"full_name": "jim/dotfiles",
"has_actions": true,
"has_issues": true,
"has_packages": true,
"has_projects": true,
"has_pull_requests": true,
"has_releases": true,
"has_wiki": true,
"html_url": "http://localhost:3000/jim/dotfiles",
"id": 2,
"ignore_whitespace_conflicts": false,
"internal": false,
"internal_tracker": {
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true,
"enable_time_tracker": true
},
"language": "",
"languages_url": "http://localhost:3000/api/v1/repos/jim/dotfiles/languages",
"link": "",
"mirror": false,
"mirror_interval": "",
"mirror_updated": "0001-01-01T00:00:00Z",
"name": "dotfiles",
"object_format_name": "sha1",
"open_issues_count": 0,
"open_pr_counter": 0,
"original_url": "https://github.com/JimMadge/dotfiles",
"owner": {
"active": false,
"avatar_url": "http://localhost:3000/avatars/284f5ca6c261672f413ef3255e5675fd",
"created": "2024-07-08T15:11:42+01:00",
"description": "",
"email": "[email protected]",
"followers_count": 0,
"following_count": 0,
"full_name": "",
"html_url": "http://localhost:3000/jim",
"id": 1,
"is_admin": false,
"language": "",
"last_login": "0001-01-01T00:00:00Z",
"location": "",
"login": "jim",
"login_name": "",
"prohibit_login": false,
"restricted": false,
"source_id": 0,
"starred_repos_count": 0,
"username": "jim",
"visibility": "public",
"website": ""
},
"parent": null,
"permissions": {
"admin": true,
"pull": true,
"push": true
},
"private": false,
"projects_mode": "all",
"release_counter": 0,
"repo_transfer": null,
"size": 22,
"ssh_url": "git@localhost:jim/dotfiles.git",
"stars_count": 0,
"template": false,
"updated_at": "2024-07-09T11:40:56+01:00",
"url": "http://localhost:3000/api/v1/repos/jim/dotfiles",
"watchers_count": 1,
"website": ""
} |
3 tasks
jemrobinson
added
the
enhancement
New functionality that should be added to the Safe Haven
label
Aug 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create functions to automate our code ingress process, probably using Gitea API
The text was updated successfully, but these errors were encountered: