Skip to main content

GitHub de Mayo - Tips about GitHub

· 3 min read

In this post I am sharing some tips about GitHub to celebrate "GitHub de Mayo". I hope you find these tips useful:

GitHub de Mayo

1. GitHub Copilot

GitHub Copilot is an AI pair programmer that helps you write code faster. It is powered by OpenAI Codex. GitHub Copilot suggests whole lines or entire functions right inside your IDE.

Here is a cool tip that can help you get the most out of GitHub Copilot:

In the chat use the slash commands / to get suggestions for code completions and snippets. For example, /explain will provide an explanation of the code, /fix will suggest a fix for the code, and /test will generate a test for the code, /tests will generate a test for the code. Also you can combine it with references like @workspace to get suggestions for your workspace.

GitHub Copilot

Here are some resources to learn more about GitHub Copilot:

2. GitHub Actions - Hosted compute networking

GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub.

However sometimes these deployments required to be in an isolated environment not from public internet because you don't want to expose your app to the public internet.

One solution is to use the GitHub Actions self-hosted runners but if you don't want to manage the infrastructure you can use the following tip:

You can use Hosted compute networking to connect the GitHub-hosted runners to resources on a private network, including package/container registries, secret managers, and other services even on-premises.

GitHub Actions

3. GitHub Advanced Security - Custom Patterns

GitHub Advanced Security features help you secure your code and your software supply chain. It includes Secret Scanning, in this service you can use your own secrets patters and GitHub Copilot can help you generate the RegEx from your secrets.

Let's suppose you want to avoid credit card numbers in any part of your source code (including documentation or comments), you can ask GitHub Copilot to generate a regular expression or use the Generate with AI feature and then register it as a secret pattern in your repository or in a GitHub organization.

Learn more about Secret Scanning here.

GitHub Advanced Security

Conclusion

I hope you find these tips useful. If you have any questions or comments, please leave them below.