æ°å¹´ããã¾ãã¦ããã§ã¨ããããã¾ãããã¨ããã
æè¿ Forkwell ã®ãã¼ããã©ãªãªæ©è½ãå¼ã£ã¦ãã@sinsoku ã§ãã
ä»æ¥ã¯å¼ç¤¾ã§èµ·ããããªãã¸ããªãçªç¶æ¶ããäºä»¶ãã«ã¤ãã¦æ¸ãããã¨æãã¾ãã
äºã®å§ã¾ã
æ¨å¹´æ«ã®26æ¥ã®æã fork ãããã©ä½¿ã£ã¦ããªããªãã¸ããªããã£ãã®ã§ãä½æ°ãªãåé¤ãã¾ããã ãã®30åå¾ãååã®app2641ã«å£°ãããããã¾ããã
app2641:ããªãã(ã¡ã¤ã³)ãªãã¸ããªã404ãªãã§ãããsinsoku ããä½ãç¥ã£ã¦ã¾ãï¼ã
sinsoku:ããããããåãããªãã§ããç§ã®æ¹ã§ã調ã¹ã¦ã¿ã¾ããï¼ããããã¦...ï¼ã
èªåã§ããªãã¸ããªã®ãã¼ã¸ã表示ãã¦ã¿ã¾ããã
404 ã§ããããã¸ã...ãAudit log ã確èªãã¦ã¿ããã
è¦è¦ãããã¢ã¤ã³ã³ã®æ¨ªã« repo.destroy ã¦æ¸ãã¦ãããããªãã...o..rz
GitHub ã®ãµãã¼ãã¸é£çµ¡
ä¸è¨ã®å 容ã§ååãã¾ããã
Hi, GitHub Team. I accidentally deleted a "grooves/xxx" repository. Can you resurrect it?
ãã®å¾ããµãã¼ãã®äººããè¿ã£ã¦ããè¿ä¿¡ãè¦ç´ããã¨ä¸è¨ã®éãã
- GitHub ã§ã¯ãªãã¸ããªã復å ã§ããããã«ã¢ã¼ã«ã¤ãã«ä¿åãã¦ãã
- grooves/xxx ã®ãªãã¸ããªã¯æ¤ç´¢ãããã©ãã¢ã¼ã«ã¤ãã«åå¨ããªã
- sinsoku/xxx ã®ãªãã¸ããªã¯ãããã©ãããï¼
GitHub ã§ã¯åé¤ããå¾ã«åãåãããã°å¾©å ã§ããã£ã½ãã§ããã é常ãªã
I can't see a "grooves/xxx" repo. https://github.com/grooves/xxx And Audit log shows "repo.destroy".
ã¨éã£ãã¨ããããæè¡çãªåé¡ããã£ã¦å¾©å ã§ããªãã£ããã¨ã³ã¸ãã¢ãã¼ã ã«å°ãããã¨è¿ã£ã¦ããã
ï¼Â´-`ï¼.。oO(ãããã㦠GitHub ã®ãã°ãè¸ãã§ãã¾ããªãã¸ããªãæ»ãã ã®ã§ã¯...)
ããã¦æ°å¹´
å¹´æ«å¹´å§ã§è¿ä¿¡ããªã GitHub ãä¼ãã§ããã ã£ãã®ã§ãé£ä¼æãã® 1/11(æ°´) ã«é²æã確èªãã¦ã¿ãã
Could you tell us about the current status? The repository is not restored yet. How long will it take?
ç¿æ¥1/12(æ¨)ã®å¤ã«ã¯è¿ä¿¡ããã£ã¦ãç¡äºã«ãªãã¸ããªã復活ããã
Sorry for the delay on this one but the repository should now be restored.
ãªãã¸ããªãç¡ãæéã®éçº
åæ¥
ãã復活ããã ããã¨æã£ã¦ããã®ã¨å°ããå¤æ´ã ã£ãã®ã§ã2ã¤ã ã Slackä¸ã§ diff ãã¬ãã¥ã¼ ãã¦ãããã¤ãã¾ããã
ãæé æ¸ãç¨æ => ããã¯ã¢ããä½æ => ãããé©ç¨ => ããããããã¤ããæåã§ããã¨ããæ§ä¸ä»£ã®ãããã¤ã«æããããæãã1æ¥ã
2æ¥ç®ä»¥é
ãªãã¸ããªã®å¾©å ã«æéããããããªè¿ä¿¡å 容ã ã£ãã®ã¨ããããã« 2017å¹´ã«ããªã£ã¦æåãããã¤ã¨ãç¡ç ãªã®ã§ãä¸æãªãã¸ããªãä½æãã¦ä½æ¥ãããã¨ã«ãªãã¾ããã
- ä¸æãªãã¸ããªã®ä½æ
- CI ã®ç°å¢æ§ç¯
- Capistrano ã®è¨å®å¤æ´
ããããã¨ã Git ã ã¨ãªãã¸ããªã®è¤è£½ã楽ã§è¯ãã§ããã
ãªãã¸ããªã復活ããå¾
Capistrano ã®è¨å®ãæ»ããä¸æãªãã¸ããªã® Pull Request, Review Comment ã¯ã¹ã¯ãªãããæ¸ãã¦ããã¯ã¢ãããä¿åãã¾ããã
#!/usr/bin/env ruby # frozen_string_literal: true require 'fileutils' require 'octokit' OWNER = 'grooves' REPO = 'tmp_repo' FULL_NAME = "#{OWNER}/#{REPO}" DOC_PATH = File.expand_path('../../doc', __FILE__) PULLS_PATH = "#{DOC_PATH}/#{REPO}/pulls" COMMENTS_PATH = "#{DOC_PATH}/#{REPO}/review_comments" Octokit.auto_paginate = true class RepoBackup attr_reader :token def initialize @token = ENV['TOKEN'] end def save_pulls mkdir_p(PULLS_PATH) pulls = client.pulls(FULL_NAME, state: :all) pulls.each do |pull| write_json("#{PULLS_PATH}/#{pull[:number]}", pull) puts "saved pulls##{pull[:number]}" end end def save_comments mkdir_p(COMMENTS_PATH) comments = client.reviews_comments(FULL_NAME) comments.each do |comment| write_json("#{COMMENTS_PATH}/#{comment[:id]}", comment) puts "saved review_comment##{comment[:id]}" end end private def client @client ||= Octokit::Client.new(access_token: token) end def mkdir_p(path) FileUtils.mkdir_p(path) unless FileTest.exist?(path) end def write_json(path, obj) File.write(path, JSON.pretty_generate(obj.to_h)) end end backup = RepoBackup.new if backup.token puts 'Start backup script' backup.save_pulls backup.save_comments puts "Backup finished and saved to #{DOC_PATH}." else puts 'USAGE: TOKEN=xxx ./script/backup_forkwell_tmp' end
対çæ¹æ³
é常ãªã GitHub ã«åãåãããã°å¾©å ã§ããã£ã½ãã®ã§ãå³éãªå¯¾çã¯ããªãã¦è¯ãããããã¾ããã ãã ãå ¬è¡¨ããã¦ãããµãã¼ãã£ã¦è¨³ã§ãç¡ãã§ãããæ°æéã§ããªãã¸ããªãæ¶ãããå°ãã£ã¦ã±ã¼ã¹ãããã¨æãã®ã§ãããã¤ãæ¹æ³ãæãã¦ããã¾ãã
1. åé¤æã®ç¢ºèª
ä»åã®ä»¶ã§åãã¦ç¥ã£ãã®ã§ããããªãã¸ããªãåé¤ããã¨ãã®ç¢ºèªç»é¢ã§ãªãã¸ããªåã ãã§ãªã ã¦ã¼ã¶ã¼å ãå ¥åãããã¨ãå¯è½ã§ãã
åé¤æ㯠sinsoku/xxx
ã®ããã«ã¦ã¼ã¶ã¼å(ããã㯠Organization åï¼ãå«ãã¦å
¥åãã念ã®ããã¹ã¯ãªã¼ã³ã·ã§ãããä¿åãã¦ããã®ãè¯ãããã§ãã
2. éçºè ã« Admin 権éãã¤ããªã
Terraform ã® GitHub provider ã使ãã°ãOrganization ã®ãªãã¸ããªãã³ã¼ãã§ç®¡çãããã¨ãå¯è½ã§ãã
- Admin ã1人ã ãä½æãã
- ãªãã¸ããªãåé¤ããã¨ã㯠Pull Request ã§ã¬ãã¥ã¼ãã¦ãããã¼ã¸ãã
- ãã¼ã¸å¾ Admin ã® token ã使ã£ã¦
terraform apply
ã§ãªãã¸ããªãåé¤ãã
ä¸è¨ã®ãããªéç¨ãè¡ããã¨ã§ãããå®å ¨ãªãªãã¸ããªç®¡çãã§ãããã¨æãã¾ãã
3. å¤é¨ãµã¼ãã¹
BackHub ã¨ãã GitHub ã®ãªãã¸ããªãå®æçã«ããã¯ã¢ãããã¦ããããµã¼ãã¹ãè¦ã¤ãã¾ããã 使ã£ããã¨ããªãã®ã§è©³ç´°ã¯ä¸æã§ãã Issue, Pull Request ãªã©ãå®æçã«ä¿åãããªã便å©ããã§ãã
ã¾ã¨ã
GitHub ã®ãã°ãªã®ããç§ã®æä½ãã¹ãªã®ãæçµçãªåå ã¯åããã¾ããã§ãããããªãã¸ããªãç¡äºã«å¾©æ§ãã¦è¯ãã£ãã§ãã
ãã®è¨äºãçæ§ã® åèã«ãªããªãäº ãç¥ã£ã¦ãã¾ããããããªãã¸ããªãæ¶ãã¦ãã¾ã£ãæã¯æ¬è¨äºãåèã«ãã¦é å¼µã£ã¦ãã ããã