- 35
- 53 839
Tug on Dev!
France
Приєднався 2 лис 2021
I am Tugdual, aka "Tug", a passionate developer. I am working as a Solutions Engineer at GitHub where I help users to adopt and use GitHub and apply DevOps, DevSecOps and other development best practices.
I just want to share ma passion about development and use this channel to as a complement of by blog: tgrall.github.io/
I just want to share ma passion about development and use this channel to as a complement of by blog: tgrall.github.io/
Configuring and Using Multiple AI Models with GitHub Copilot
In this video, I demonstrate how to configure and use multiple AI models with GitHub Copilot, expanding the possibilities for your coding projects.
You'll learn how to set up different models, switch between them as needed, and optimize Copilot to better support complex tasks.
You'll learn how to set up different models, switch between them as needed, and optimize Copilot to better support complex tasks.
Переглядів: 142
Відео
Refactoring code to create a new React component using Copilot Edits
Переглядів 20012 годин тому
Extracting some code to create a new React/NextJS component from a TSX file using GitHub Copilot Edits. Improving the code by replacing a string by its i18n properties.
Using GitHub Copilot Edits to add new translation to my NextJS Application.
Переглядів 63721 годину тому
Adding new entry in my i18n files using Copilot Edits. This new feature of VSCode Copilot Chat allows me to modify multiple files easily.
Internationalization (i18n) with GitHub Copilot
Переглядів 61День тому
In this video, I show how to use GitHub Copilot Chat to help me to add a new language to a React/NextJS application.
Creating a new GitHub Issue with Copilot Chat
Переглядів 8814 днів тому
In this demonstration, I use Copilot Chat in VS Code to create a new GitHub Issue and help me to write the specifications.
Securing & Refactoring in VSCode with Copilot
Переглядів 15421 день тому
In this demonstration, I use Copilot Chat in VS Code to refactor some code: - extract all SQL queries database interactions from an API Controller into a new Repository Class - Rework the SQL Queries when they are not save commenting them with some explanation - Add Try Catch block in the new code for exception management
Explaining Vulnerable Code & Refactoring
Переглядів 27621 день тому
This demonstration shows how to use GitHub Copilot Chat in IntelliJ to check if some code is safe, and also use the chat to refactor the code: - create new API to access database - call these new API from a Spring controller
Simplifying code with GitHub Copilot
Переглядів 12421 день тому
This short demonstration shows how to simplify some code with Copilot - in IntelliJ using right click menu and inline chat - in VSCode using Chat
How did GitHub Copilot assist me today? From raw data to JSON Array
Переглядів 8888 місяців тому
In this video I show how I used Copilot Chat to create JSON data from raw data extracted from a product catalog. 00:00 - Introduction 00:10 - Copying data from a website 00:12 - Writing my ask in Copilot Chat, referencing the current file with #file 00:24 - Paste the raw data in the chat 00:26 - Describe how I want to map the fields to my JSON Attributes 00:35 - GitHub Copilot generates the new...
How did GitHub Copilot assist me today? Formatting data in my IDE
Переглядів 5818 місяців тому
In this short video, I use Github Copilot to copy some information from a Web page and paste it in my IDE. Then with a simple ask to Copilot Inline Chat I am extracting some information -some GitHub Handles - from the text and format it as CSV. 00:00 - Introduction 00:04 - Copying data from a GitHub Issue (containing some data) 00:08 - Pasting the data in data in VSCode 00:12 - Asking Copilot t...
How did GitHub Copilot assist me today? Creating CSV file from SQL Statements
Переглядів 4698 місяців тому
For some tests I needed to create CSV from some data stored in SQL (not yet in a database). I have simply asked GitHub Copilot to generate the CSV from the insert statements of the SQL fille. 00:00 - Introduction 00:03 - Opening the SQL file 00:06 - Asking Copilot Chat to generate CSV from the SQL file using #file command 00:24 - Getting the results with explanations 00:28 - Asking for an addit...
How did GitHub Copilot assist me today? Implementing a new idea in 2mn
Переглядів 1,9 тис.9 місяців тому
As I am rewriting my application to Next.js I want to cleanup the images that I used and create cleaner images: - same format - same size - thumbnails I tools few minutes to create a Python script, with a help of Copilot to do this, and once again Copilot helped me 00:00 - Introduction 00:05 - Defining my needs 00:19 - Reviewing the suggested code 00:25 - Testing the script 00:29 - Asking Copil...
How did GitHub Copilot assist me today? Fixing a test failure
Переглядів 54710 місяців тому
I have a REST Service that take a list of documents mapping a OneToMany relation in Quarkus Panache. When I remove some elements the ORM does not automatically delete the record from the database, so my test is failing. I am using GitHub Copilot to ask for suggestion from a comment that will add the proper business logic. 00:00 - Introduction 00:04 - Test is failing 00:11 - Describing the logic...
How did GitHub Copilot assist me today? Resize React Components
Переглядів 37510 місяців тому
I am building an horizontal form, and needed to distribute few elements to reach 100% width; I asked GitHub Copilot to do some basic math to get the current total width, then I asked Copilot to resize each elements. 00:00 - Introduction 00:04 - Asking Copilot to calculate the current total width 00:12 - Asking Copilot to resize elements 00:22 - Getting new elements 00:24 - Applying the changes ...
How did GitHub Copilot assist me today? Extract list item to update React state
Переглядів 19310 місяців тому
In my React form, I had to update the value coming from a list. GitHub Copilot gave me the impression of reading my mind when it generates the code to: - extract the value from an array - update the object using the spread operator. 00:00 - Introduction 00:07 - Capturing the change in the list component 00:20 - Changing the function that update the state 00:24 - Writing a condition for the fiel...
How did GitHub Copilot assist me today? Hiding a React/Next Component
Переглядів 21910 місяців тому
How did GitHub Copilot assist me today? Hiding a React/Next Component
How did GitHub Copilot assist me today? Writing a Class from a JSON Object
Переглядів 47010 місяців тому
How did GitHub Copilot assist me today? Writing a Class from a JSON Object
How did GitHub Copilot assist me today? Internationalisation of my Application!
Переглядів 15410 місяців тому
How did GitHub Copilot assist me today? Internationalisation of my Application!
How did GitHub Copilot assist me today? Writing sample data scrapped from a website
Переглядів 26110 місяців тому
How did GitHub Copilot assist me today? Writing sample data scrapped from a website
How did GitHub Copilot assist me today ? Creating a function from a URL
Переглядів 18710 місяців тому
How did GitHub Copilot assist me today ? Creating a function from a URL
Rewriting a Python app in C# with the help of Copilot
Переглядів 750Рік тому
Rewriting a Python app in C# with the help of Copilot
GitHub Copilot X : Inline Suggestion & Copilot Chat (fixing vulnerability)
Переглядів 5 тис.Рік тому
GitHub Copilot X : Inline Suggestion & Copilot Chat (fixing vulnerability)
Copilot : Build a new features in few minutes
Переглядів 688Рік тому
Copilot : Build a new features in few minutes
Copilot: code faster with contextual suggestions
Переглядів 881Рік тому
Copilot: code faster with contextual suggestions
GitHub Self Hosted Runners on Kubernetes
Переглядів 4,6 тис.2 роки тому
GitHub Self Hosted Runners on Kubernetes
Getting Started with GitHub Releases
Переглядів 5 тис.2 роки тому
Getting Started with GitHub Releases
I don't know what's funnier: the LLM suggestion breaking the app, the french muttering, or that the video ends without a fix xD
we are dooomed
why ?
The code is too small I can’t see what you’re doing
I will do better the next time. If you are looking for the code it is available on the associated blog post: - tgrall.github.io/blog/2021/11/07/how-to-write-a-github-action-annotation-api - github.com/tgrall/check-files-action
where can i find the code
I think my muscle memory of Ctrl+f, shift+line break, tabs to switch to replace, comma still beats copilot, but need to try the first option instead of writing a regex
Sure, and I still use a lot the standard find and replace, but once you have the possibility to use the natural language is can be very helpful, I am publishing another example today to create data for my product catalog extracting raw data from an Web site and get them as JSON. The idea of these examples is just to think out of the box when using GitHub Copilot.
Oh
I appreciate the time you to put chapters..
merci
you are my saviour, thanks
Thx a lot for this video!!
I have installed it and can't get it to do anything , it keeps repeating whatever I type just parroting me, plus I don't have that tab menu on the left and don't know how to get it ... i tried everything
Do you still have the issue? In which IDE?
This is great, thanks. Would it be possible to publish the calculator-service repo for people who are just getting started with runners and workflows? I want to see what's in the arc-test.yml file.
Interesting, I see you had it update development by having a PR open. Which means it will update on each new commit into the open PR, which is nice. But if there are 2 PRs open one with feature1 and another with feature2. This approach would then break down right? PR1 would update the environment, then PR2 would hijack it. Which could happen in the middle of dev1’s testing and give strange session clearing issues / bugs. Updating development of an open PR doesn’t sound like the right approach. Instead when the PR is merge you would update development. If the PR is open and the dev wants an active environment to check against. You can create a temporary pr-env-# environment if they enter a command response into the PR e.g. “make environment” or have it automatic. This way you are not clashing the changes and creating a nightmare for leadership / individual developers in a multi dev team.
Would love to hear your feedback on this. I am using development, quality assurance testing, user acceptance testing and production. Sometimes I will have a temporary penetration testing environment or even accessibility / localisation environments. dev qat, pen, a11y, l10n uat prod I’m also rolling out multiple frontends, backend APIs, serverless lambdas, and infrastructure as code changes (via terraform). dev is automatically updated on the merge of a PR, qat is updated by the testing team via a manual trigger / webhook (click button ins chat channel) pen is used only if we have active penetration testing going on, otherwise it is shut down. And is triggered manually. Same for a11y and l10n. uat is updated by the business analyst / quality assurance team (again via webhook in chat channel) For production when a release is created then the environment will update. We have compliance, linting, building, testing (unit, integration, pact contracts, e2e* and component) We have infrastructure plan / apply with manual approval (prod only) after reviewing the plan. We have updating of assets S3, ECR etc.
First of all , sorry for the late response. You are correct, I am sharing the same "environment" for all developments PR, but it is just a choice of implementation based on your infrastructure. So in my case I have a single K8S cluster, and I use 1 namespace by PR, so this is how I segregate the preview-environment. And what you are describing is probably what I would do it "real life project" (compare with my demo environment used for enablement), as you can see in my demonstration for example I am not talking about infrastructure (beside K8S deployments), and I know that it is missing. You environment and process looks very good and would be nice to learn more about it, if you have blog post or video about this do not hesitate to share it!
Volume is too low, about 10-15% higher
Will do better next time
Great explanation, thanks!
I am subscribed with copilot how do I find that chat extension?
Hello, GitHub Copilot Chat is now generally available, as you can see here: github.blog/2023-12-29-github-copilot-chat-now-generally-available-for-organizations-and-individuals/ It is part of the VS Code, VS and Jetbrains extensions
hi, do you have any ideas when the copilotX is available for public?
Hello, GitHub Copilot Chat is now generally available, as you can see here: github.blog/2023-12-29-github-copilot-chat-now-generally-available-for-organizations-and-individuals/
I'm also curious how long it took you to get accepted
Not long.. as I am working at GitHub, so we have a different process. Be patient, the GitHub Copilot team is working on the waitlist to accept new developers.
How long did it take you to get accepted?
Not long.. as I am working at GitHub, so we have a different process. Be patient, the GitHub Copilot team is working on the waitlist to accept new developers.
What are the steps on enabling this in VSCode with Copilot? I am in private beta of Copilot chat, but don't see the chat in VSCode.
Hmm you should have received the instruction. Since I am working at GitHub, I am not sure we have the same process. I will look for this information.
Thank you for amazing explanation, appreciate it. Keep up the good work :)
Is it running directly on your machine (1 folder per runner) or it creates a new container? I am not well versed in kubernites
You can run some self hosted runners on your machine, but in this video I am using a Kubernetes Cluster that is running on a cloud provider (Google Cloud in the demo). So all the orchestration of the containers (so the runners) is automatically done by Kubernetes.
Thanks for the great explanation! how would you go avoid using this environment for the cloud? For example for GCP each environment would be linked to a different GCP Project? and any suggestions for AWS? lastly, is the repo available?
Hello Jaimerv19 First of all sorry for the late response. I make a very generic IT answer "it depends" :) ... In my demonstration I am using a single K8S cluster and use name spaces to target environment so no "cloud environment". So if we want to target different cloud environment and higher "components" I would probably use "tags" that are generic for all cloud providers. While as you mentioned in GCP you can use projects, and in Azure you can use Ressource Groups. What do you think about using the tags? (like that you can use the same names and concepts on all clouds)
Hugh Jackman teaching DevOps. Just what I needed to see today. Thanks.
Great tutorial. Simple and straightforward. Thank you for this.
T'es super bien coiffé Tug
Thanks ❤️
Good one. But how to configure the self hosted runner ?
The runners them self are controlled by the Kubernetes cluster, so I am not sure which type of configuration are you looking for? Based on this I will give you more information. PS: Sorry for the late reply.
I want to know what it would have said the best programming language is
I have asked Copilot, here the conversation: 😊 Copilot: NantesJUG is a Java User Group in Nantes, France. Me : What is the best programming language? Copilot: The best programming language is Java. Me: What is the best IDE? Copilot: The best IDE is IntelliJ IDEA. Me: What do you think about VS Code? Copilot: I think VS Code is a good IDE. Me: Not better than IntelliJ IDEA? Copilot: I think IntelliJ IDEA is better than VS Code. Me: In which programming language GitHub is written? Copilot: GitHub is written in Ruby. Me: What is the best language to write a compiler? Copilot: The best language to write a compiler is C. Me: What's tgrall favorite programming language? Copilot: tgrall favorite programming language is Java. Me: What's ThatChapThere favorite programming language? Copilot: ThatChapThere favorite programming language is Java.
@@tug-grall My favourite language is Java? Slander! Seriously though I'm pretty sure copilot just picks the language of the file you're in.
Thank you!
😀👍
Thanks I am new to GitHub actions not sure what I am doing trying to figure out how to deploy to production on a commit.
Hello Nathan I am inviting you to look at this video, where I deploy in various environment depending of the branch I am working on: ua-cam.com/video/79zVyoxnuWY/v-deo.html Or this documentation page: docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service I am pointing to Azure here, but as you can see on the menu you can use any cloud provider, or any target. Feel free to tell me more about the type of deployment you are doing to see if I need to add more information. Note: the deployment will happen on the "Push" (since the commit is done on the machine of the developer) Tug
@@tug-grall Thanks I will check it out. I am not sure if I am doing it right but I am self hosting and using that to run batch files to do a git pull. Someone told me I am doing it wrong but seems security to me.
You do not need to do a git pull directly you can use a GitHub Action, usually we use this action: - github.com/marketplace/actions/checkout It is totally OK to use self-hosted runner, if you need to access some resources on your network, but you have to manage the process yourself, where GitHub Managed runners are fully managed by GitHub, so you have nothing to do. When using GitHub Hosted Runners, the VM behind it is automatically decommissioned once the job is done, as documented here : docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#using-a-github-hosted-runner Can you clarify what you mean by "security" in your last comment?
@@tug-grall I am running a git pull on the server from the runner. Right now I do not have an SSH setup to get into the server so by self hosting with very few repos and users I figured this is okay to just have the git pull don from the runner. I am wondering if this is the best option and if it is an okay option.
thanks good
Good Walkthrough...Please increase Volume
I will do
Thanks for this great walkthrough! Is it possible de dynamically create a environment during the workflow execution? Defining something like "environment: ${{ any-var }}" Thans again
Yes, but you need an env variable
You can pass the "name" of an environment as a variable as you are showing. One of the reason to create an environment is to have "secrets" with a fine grained scope or permissions, so in this case you have to create the environment itself using the UI or GitHub API. Do not hesitate to describe more your use case and I will be happy to add information
coucou go 60 sub
Cheers, nice video!
Thank you for sharing this!
Amazing