Github API: How to standardise my Zillion projects?

PyGithub Library

  • Easy access: engineers can easily invoke Lambda functions from either a terminal or AWS UI.
  • Security: we want to save the token to access Github API in a safe place (AWS Parameter Store) and ensure that all engineers are using the same one.

Access token

Creating a Repository

Branch Protection Rules

Manage Access

  • pull - team members can pull, but not push to or administer a repository.
  • push - team members can pull and push, but not administer a repository.
  • admin - team members can pull, push and administer a repository.
  • maintain - team members can manage the repository without access to sensitive or destructive actions.
  • triage - team members can proactively manage issues and pull requests without write access.

Tips

  • PygGithub has a great documentation, but sometimes it worths checking the Github API directly to figure out some attributes.
  • Build a tool with some default values, but allow users to customise some arguments.
  • Create configuration applicable for teams instead of individuals, admin work can grow exponentially if you need to setup rules for each member of an organisation.
  • Create a company token to access Github API and store that in a safe place.

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store