Giter Club home page Giter Club logo

github-presentation's Introduction

Github Presentation

This project is centered around a mock-customer scenario in which security for branches needs to be applied.

Questions

  1. What is the client name?
  2. Who are the attendees (their names)?
  3. What is the "langugage of choice" for client's developers?

Notes

  1. Official "octokit" wrapper has support for Ruby, .NET, and JavaScript. Other wrappers exist, but are third-party.
  2. Free organizations can only protect public repositories.

Demo

To see the code in action, follow the steps below.

Steps

Note: all terminal commands should be ran from the cloned repository directory.

  1. Clone this repository
  2. Install Prerequisites
    1. Ngrok (instructions)
    2. Node.JS (instructions)
  3. Install node dependencies with the command npm i
  4. Create a secret with the command npm run secret
  5. Create a personal access token (instructions)
  6. Create env file:
    1. Make a copy of env.demo and save it as env.
    2. Update the contents, replacing all <variables> with the appropriate values from steps 4 and 5, then save.
    3. Source the environment file with the command . ./env
  7. Create a new organization (instructions)
  8. Run Ngrok with the command npm run server (must stay running).
  9. Create a new webhook for your organization (instructions)
    1. Use application/json for content type
    2. Use the Ngrok url from the terminal that is running it for Payload URL
    3. For secret, paste the value from step #4.
    4. For events, choose Let me select individual events. and check Repositories
    5. Make sure Active is checked.
  10. In a separate terminal, run command npm run app
  11. Attempt to create a new public repository in your organization

Outcome

The new repository will have two branches (main and dev) created automatically, as well as branch protection rules.

Troubleshooting

  • If the code fails after trying to protect the main branch, make sure you set the repository as public and NOT private.

To Do

  • Add an issue to the repository with an @ mention for myself. ???

Additional Files

  • github-presentation.pptx: contains the presentation slide deck.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.