github-app/advanced_server.rb
# When a repository is create, restrict master
When a repository is create, restrict master
When a repository is create restrict master
def handle_protect_branch(payload)
      rules = YAML.load_file(File.join(__dir__, 'config.yml')) 
      accept_header = 'application/vnd.github.luke-cage-preview+json'.freeze
      @bot_client.protect_branch(
          payload['repository']['full_name'],
          'master',
          rules.merge(
              accept: accept_header
            )
        )
    end
def handle_protect_branch ( payload ) rules = YAML . load_file ( File . join ( __dir__ , 'config.yml' ) ) accept_header = 'application/vnd.github.luke-cage-preview+json' . freeze @bot_client . protect_branch ( payload [ 'repository' ] [ 'full_name' ] , 'master' , rules . merge ( accept : accept_header ) ) end
When a repository is create, restrict master
When a repository is create restrict master
# config moved # protect master_brulesch # confirm it is so # @bot_client.branch(repo=repo, branch='master', options={})
payload