Text Processing Service

Text Processing Results

Text Processing Results

Nadpis na youtube 7 - How I Became a Proficient Typescript Developer with GitHub Copilot - Jorge Hidalgo, Accenture
Url https://www.youtube.com/watch?v=dEhj-wCu8t4
Stav hotovo
Jazyk en
Súhrn Jorge Hidalgo showcased how GitHub Copilot helped him build GitHub Actions despite limited TypeScript experience. He demonstrated the tool’s ability to boost developer productivity by automating code generation and simplifying complex tasks.
Bloky súhrnu
  • 00:00:00 - 00:05:00: Jorge Hidalgo shared his experience using GitHub Copilot to overcome a lack of TypeScript knowledge while creating GitHub Actions. He aims to demonstrate Copilot’s usefulness, limitations, and how it boosts developer productivity through coding assistance and more.
  • 00:05:00 - 00:10:00: The speaker demonstrated using an AI tool, Copilot, to generate code for a Java Spring Boot application and a custom GitHub Action. He highlighted the tool's ability to break down complex tasks and infer user intent, even with imprecise requests.
  • 00:10:00 - 00:15:00: The speaker is using an AI assistant within an IDE to quickly create and customize a GitHub repository. The assistant provides templates, suggests needed file modifications, and offers real-time advice, streamlining the development process.
  • 00:15:00 - 00:20:00: The discussion outlines a software release process. It requires parameters like release version, target environment URL, and status, with the system intelligently suggesting and completing code.
  • 00:20:00 - 00:25:00: The speaker is using Copilot to help generate unit tests, emphasizing its ability to infer expected input parameters and outputs. They're demonstrating how Copilot connects code and tests, and they’re cautiously optimistic about its utility.
  • 00:25:00 - 00:30:00: The process involved adjusting a template's workflow, resolving an unexpected input error, and refining action parameters. The goal is to create a workflow triggered by issue creation and comment approval/cancellation.
  • 00:30:00 - 00:35:00: The user wants a GitHub workflow that automatically triggers a release action when a comment saying "Approve" is added to an issue labeled "Release." The workflow also needs permission to read content and write issues, and ultimately close the issue after the release is triggered.
  • 00:35:00 - 00:40:00: The speaker is demonstrating an automated release workflow built using GitHub actions and Copilot. It involves adding a GitHub token, creating issues, and using Copilot to infer code for handling release requests and cancellations.
  • 00:40:00 - 00:45:00: The speaker believes AI assistants, like Copilot, represent a new level of abstraction in software development, automating repetitive tasks and increasing efficiency. While not perfect, these tools are here to stay and offer a significant advantage, similar to trusting a compiler.
Prepis 00:00:05 - 00:00:11 00: Hello, everyone. Welcome to this talk. Thank you for the three times. I will remember that.
00:00:12 - 00:00:20 00: OK, so this story is going to be a bit different because it's live coding, but I'm not going to be the one doing most of the coding.
00:00:21 - 00:00:25 00: The idea of this talk comes from an actual project experience.
00:00:26 - 00:00:28 00: We were starting to introduce GitHub.
00:00:30 - 00:00:36 00: We were needing to create some actions for customizing workflows that we were doing.
00:00:36 - 00:00:39 00: I have a problem. I don't know any TypeScript.
00:00:40 - 00:00:44 00: And to create your own GitHub Actions, you use TypeScript language.
00:00:45 - 00:01:01 00: So I know Java, C, C++, Scala, many others, but not a single line of code of typescripts. And that's when I came to this idea. Will Copilot be the tool that helps me to do my task
00:01:01 - 00:01:18 00: being this gap that I have with TypeScript, because I know what I want to do. I know the APIs. I know how GitHub workflows and actions work. I just don't know how to create in TypeScript code. And from that real experience, that ended well, by the way,
00:01:19 - 00:01:25 00: I'm doing this dramatization, so to speak, trying to fit it into 30 minutes or so.
00:01:27 - 00:01:39 00: My objective with this is to demonstrate how useful is the tool, also what are the limitations, and how we work with it to be more productive, better, happier developers.
00:01:40 - 00:01:44 00: So, a bit about myself. I'm Jorge Hidalgo.
00:01:46 - 00:02:07 00: I came from Spain. I'm director of software engineering, and I also have the honor to be a global co-leader here in Accenture, and our lead for DevOps and architecture practices there. A lot of work also with local technology communities and conferences, which is also important.
00:02:09 - 00:02:15 00: So what is GitHub Copilot in a nutshell? Could you raise the hand who knows what is GitHub Copilot?
00:02:16 - 00:02:37 00: OK, so two thirds maybe. So the very fast intro is going to be faster. So just a large language model, which is specialized in software engineering matters. So just based on the LLMs, but with this special twist to be able to have conversation with us about our job.
00:02:39 - 00:02:59 00: So GitHub Copilot is part of the GitHub platform, which is probably one of the most popular in the world. So millions of developers. You can have your whole projects, lifecycle, CI, CD, automation, security, all the stuff. And Copilot sits, let's say, on top of that, because the aspiration is to try to help in everything, not just writing code.
00:03:00 - 00:03:06 00: documenting pool reviews, et cetera, et cetera. But today, we are going to put the focus in coding, OK?
00:03:09 - 00:03:32 00: With GitHub Copilot, you can work in two main ways. One is the CLI. So you can just go to the CLI and start asking things. Or, which we are going to show today, which is really excellent, is integrated with an IDE. So don't forget the IDEs, these very old tools, but incredibly useful. Now we can supercharge them with the help of the system.
00:03:33 - 00:03:45 00: The system has two modes. We are going to see both. One is a chat. I'm going to ask things, and he's going to respond to that questions or doubts that I have. And then it has inline completion.
00:03:46 - 00:03:50 00: Based on the context, what I'm typing, what I'm trying to do, it will
00:03:52 - 00:04:02 00: try to give the intention of what I want to do and fill in or propose to fill in the rest of the code. So we are going to see both during the demo.
00:04:04 - 00:04:30 00: Before going into that, just a few figures. This comes from a pilot that we did in Accenture internally with our people. You know how difficult it is to measure productivity, in particular, developer productivity. Many people are trying to do that since 30 years ago, 40 years ago. Lens of code, it does not work. Number of commits, it does not work. I don't have the answer. But the important thing is that
00:04:31 - 00:04:57 00: feelings of the people using the tool were positive in the sense that they feel like successful on the first day of the task, that they feel that the code they were writing was better. And there is this interesting figure, the 88%, which is a very objective measure by the tool. So 88% of the code suggestions were retained in the final commit.
00:04:58 - 00:05:12 00: Yes, there is still a number of things that the tool is not solving. But if it can help us with those 88%, which is probably the boring code, repetitive code, the things that we are doing once all over again, that's great. OK?
00:05:13 - 00:05:19 00: So just wanted to share a few figures, but now let's go into what we came today.
00:05:21 - 00:05:36 00: So let's go to the IDE. So this is Visual Studio Code. You can integrate compiler with other IDEs as well. And then here, we have this chat window. OK? You can see Wallet from the back of the room. Yes?
00:05:37 - 00:05:37 00: Okay.
00:05:38 - 00:05:44 00: So well, I ask hello just to confirm that the internet is working. OK.
00:05:46 - 00:05:57 00: So it's here. So let's start. When I started with Copilot, probably all of us that have tried the tool has done the same. I'm going to ask something. I know the answer. And let's see how it goes.
00:05:58 - 00:06:04 00: So I'm going to do that. Hello, I'm a Java developer.
00:06:05 - 00:06:07 00: And I want to create
00:06:08 - 00:06:09 00: Spring.
00:06:10 - 00:06:15 00: Boot application to serve a REST API. OK? That's nice.
00:06:17 - 00:06:21 00: The domain entity is going to be...
00:06:22 - 00:06:23 00: conference talk.
00:06:24 - 00:06:28 00: Not the typical entity that you will see in a tutorial or a demo, OK?
00:06:30 - 00:06:33 00: And its fields are going to be.
00:06:34 - 00:06:37 00: session. Title, description.
00:06:39 - 00:06:42 00: Proficiency level, duration.
00:06:43 - 00:06:44 00: Minutes.
00:06:47 - 00:06:49 00: and the list of speakers.
00:06:50 - 00:06:51 00: Okay, so now my ask.
00:06:52 - 00:07:00 00: Could you provide a step-by-step guide on how to create that application?
00:07:02 - 00:07:13 00: Thanks. Always be thankful, okay? So if they become sentient any time, they will always remember, because it's in the training data, that I was a really, really nice person, okay?
00:07:16 - 00:07:34 00: There is also a kind of scientific approach that tells us cities based on training, on actual conversation, humans tend to be better responsive when they are kindly asked of things. So let's try to work on that. So as you can see, a lot of things have come around. And they are actually really, really great.
00:07:34 - 00:07:53 00: So one of the things that really surprised me at the beginning is that it breaks your whole problem, which can be quite complex, into smaller, simpler tasks. I'll introduce you the answer based on that sequence. So step one, we are doing this. Step two, let's do that.
00:07:54 - 00:07:59 00: I mean, compare this with my experience. I look at this, and this is actually very good.
00:08:00 - 00:08:11 00: So the entity is here. One of the things that surprised me is that I tell the field list of speakers, and the tool really inferred that I wanted a list type.
00:08:12 - 00:08:39 00: of speakers, not list of speakers property. So it creates a list, its enumeration. And then it creates all the rest of the code that is needed to create that entity, the REST API and everything. It also helps me to set up an in-memory database so I can test it. And if I happen to not know anything, it gives me some hints on how to test it directly with the API command.
00:08:41 - 00:09:07 00: As a Java developer, I look at this and say, it's quite good. Probably it does not compare 100%. I've not tested it. But it looks quite complete. So I gave it some trust. And this is important. We need to give it some trust, because now I'm going to the unexplored space. I'm going to the TypeScript stuff. And if I don't have any trust, probably I will not know anyway. So now let's go into our actual task. Hello?
00:09:10 - 00:09:15 00: I want to create a custom GitHub action with TypeScript.
00:09:19 - 00:09:20 00: Could you provide?
00:09:21 - 00:09:22 00: Guidance.
00:09:23 - 00:09:25 00: on how to do that.
00:09:26 - 00:09:41 00: Thanks. You don't need to be super precise with the question. You can even make some typos, et cetera. And the intention with the LLM is quite good, as we can see with ChatGPT or other LLMs like YAMA or whatever. So when I look at this.
00:09:42 - 00:09:44 00: I can see that it looks quite well.
00:09:46 - 00:10:03 00: But there is a lot of coding here, a lot of steps. I think that there is probably something. We can do this better, no? Actually, this works. But I'm trying to direct the assistant into really what I want. And this is one of the important points of Copilot or any other assistant.
00:10:03 - 00:10:19 00: Maybe the answer is not 100% right the first time. You need to direct it a bit. And that's what I'm going to do now. I'm going to say, is there any repository templates?
00:10:20 - 00:10:23 00: that I could use to speed up the process.
00:10:25 - 00:10:27 00: I don't need to type all these things.
00:10:28 - 00:10:35 00: So when I direct the assistant into how I want it to be done, it actually nails it. It gives me...
00:10:36 - 00:10:53 00: the repository template that I can use. It will help me to clone and start using it. And it's also going to give me the hints in which files do I need to modify inside the template to customize it to my own use case. So that's perfect. Let's go for this.
00:10:54 - 00:11:11 00: Another interesting thing, it's an LLM, so it's not agentic. It does not do anything for us. But with the IDE integration, you will see around the demo that we are going to have a lot of links, et cetera. So it simplifies things as much as possible. So if I just click here, link.
00:11:12 - 00:11:13 00: I get the browser open.
00:11:14 - 00:11:18 00: And then it can just use this template, create a new repository.
00:11:19 - 00:11:27 00: go to my own personal account, and say action, do release, open Slava. Let's create this repository.
00:11:29 - 00:11:31 00: It's going to take just a few seconds.
00:11:35 - 00:11:38 00: And I'm going to take the link.
00:11:39 - 00:11:53 00: Now I remember the next steps because I've been using it for a long time. But even if not, the assistant already told me which commands I needed to do to clone the repository and start working with it. But in this case, I'm not going to need it. So let's come here to our folder.
00:11:57 - 00:11:58 00: I...
00:12:00 - 00:12:00 00: Okay.
00:12:02 - 00:12:14 00: If I type it, well, we will go there. And now I'm going to do the guide clone under repository. So now I have here the codes. I'm going to move into this directory.
00:12:16 - 00:12:19 00: And I'm going to open this folder into
00:12:19 - 00:12:20 00: Visual Studio Code.
00:12:22 - 00:12:29 00: OK, if I now came back to code, so I'm going to make it a bit larger.
00:12:30 - 00:12:33 00: I have here this project that was created
00:12:34 - 00:12:45 00: And I can come back to the chat, which is new, because it's a new project. It's new. And I just forgot what the assistant told me about some files or something like that. So I'm going to ask again.
00:12:47 - 00:12:50 00: Which files do I need to modify?
00:12:51 - 00:12:54 00: to customize this GitHub action.
00:12:58 - 00:13:18 00: One of the things that you can see is this reference to workspace. From this moment, as I have code in the IDE, the system is going to look into that code to fill in the context. So I don't need to be super precise with some things, because it already knows which technology is what I'm trying to do.
00:13:19 - 00:13:35 00: So here, the advice is super precise. Modify action.yaml file, main TS, modify the tests, modify the documentation. Maybe you need to modify this as well. So let's do that. Let's start with the action.yaml file.
00:13:37 - 00:13:54 00: OK, I've never done a GitHub action in TypeScript, but this looks pretty straightforward. So what's the name of the action? The release. It's an action to create releases automatically from issues. If they get approved, we will do the release. If they don't cancel, we will cancel the release. So description.
00:13:56 - 00:13:58 00: you can see the inline compression.
00:13:59 - 00:14:17 00: As I type, it tries to infer what I want to do and start suggesting things. So in this case, your action description here. Not so useful. But if we say automate the release process. So I just click that and complete that. It's good enough.
00:14:19 - 00:14:30 00: My name, so John Doe, when I put the J. So not so famous as Martin says, OK? But with the H, OK, it looks good.
00:14:32 - 00:14:50 00: And then let's customize an icon. So this is about releasing, so let's place release, and OK, release SVG. But notice that the ID puts this red signal. So based on the training data and on files of similar type,
00:14:51 - 00:15:14 00: The system thinks that release.svg is a nice value for that. But in this precise content, it's not. But fortunately, the IDE is still there for us, providing this kind of advice. So release.svg is not a valid value. It will explain to me what are the valid values. So I'm going to replace it with another one, like, for example, uploadCloud.
00:15:15 - 00:15:17 00: And color red? No, color purple.
00:15:18 - 00:15:27 00: OK, so input parameters, milliseconds. We don't need milliseconds here. We need the release version, for example. So release.
00:15:27 - 00:15:28 00: Merci.
00:15:29 - 00:15:30 00: Description.
00:15:32 - 00:15:36 00: The version to release? Sanskrit. Is this required? Yes.
00:15:38 - 00:15:42 00: Which other parameter do we need? The target environment. So target.
00:15:44 - 00:15:46 00: Branch know, environment.
00:15:48 - 00:15:49 00: I want it complete.
00:15:50 - 00:16:19 00: If you start to think, when I advance in the process, it is capable of inferring more of my intent, and code completions are becoming more and more, let's say, bigger. It's able to really provide more guidance in advance. So in this case, everything is good for me. So the outputs, well, time is OK, but this is really a bad description, because this is about release. So the time.
00:16:21 - 00:16:22 00: the release,
00:16:24 - 00:16:25 00: was created. That's great.
00:16:27 - 00:16:31 00: We also need the release status. Did it finish well or not? So release.
00:16:34 - 00:16:50 00: status. The status is quite good. And also the target URL when this is finally. So the URL of the target environment. Quite great.
00:16:50 - 00:17:00 00: With this, we finish. If you've seen, there are many things that, with this inline compression, I'm just getting. And these are, you know, seconds, seconds. No big deal when you look at them individually. But when you submit that at the end of the day, there are a lot of seconds that we could just save because of these small suggestions.
00:17:00 - 00:17:10 00: So actually, Jammer is one of the things that we need to modify. And then we also modify the main TS, which is, let's say, the main code where we are going to do our release.
00:17:20 - 00:17:20 00: So I can see here.
00:17:20 - 00:17:20 00: the input parameter milliseconds, we don't have it. So we have
00:17:20 - 00:17:20 00: release version.
00:17:20 - 00:17:30 00: And it's not milliseconds.
00:17:30 - 00:17:40 00: Look at this. It's interesting. Based on the training data, it suggests me released version. But it's released version. But good enough.
00:17:40 - 00:17:40 00: But now when I say const tgtf, look at that.
00:17:40 - 00:17:50 00: It already connects the time checking, the parameter. And what is logical is that you now want to add the second parameter.
00:17:50 - 00:18:00 00: Actually, that's correct. I want to add the second parameter. It makes sense.
00:18:00 - 00:18:20 00: So next, we have some debug. I'm going to change to info. And I want to just lock the input parameter so we can see this in the lock. And it's already there. And you can see that it's referencing the actual variable name that I on purpose named rel bear, trying to trick a bit the assistant. But it really connected the dots.
00:18:20 - 00:18:30 00: And you forget to add the second one.
00:18:30 - 00:18:40 00: immediately connect to the dots and infer that this is what really I want to do. OK, so this is waiting some time. We are just going to wait for one second.
00:18:40 - 00:18:40 00: Amen.
00:18:40 - 00:18:50 00: Okay, just one.
00:18:50 - 00:19:10 00: Perform the actual release, OK? Obviously, today, with the time, we are not going to go and do the whole release. But at least we can just have this sense that has done anything. And now, set the outputs. So time is already there. We don't need to do it. But if I say, set output.
00:19:10 - 00:19:10 00: and say,
00:19:10 - 00:19:30 00: For example, this case is not getting it at the first. But if I say release a status, it suggests me some code. When we advance and complete this action, we will change success with the actual result. But for now, it's good enough. And core set output.
00:19:30 - 00:19:30 00: And we say, target environment, no, sorry, target URL.
00:19:40 - 00:20:00 00: It also suggests me some hard-coded URL. So for now, we are good to start. There's one more thing that we need to change, which are the unit tests. If I don't do it, I'm not going to be able to process this. So it gives me to the right folder. I click here. And let's modify this. So as you can see, we have this red, because I forget to run one command.
00:20:00 - 00:20:30 00: It was actually told to me by the assistant. I forget to do it. But npm install. Just in a few seconds, there is no need to load anything new. And we will have the right packages there. So this already is good. OK, so let's modify the unit test. So we are not using the book. We are using info. So as you can see, this is based on the template. So really, there is not really a fault on the system.
00:20:30 - 00:20:30 00: And the fail, we are not going to use it.
00:20:40 - 00:20:40 00: So let's initialize the info one.
00:20:40 - 00:20:40 00: which is for the info method.
00:20:40 - 00:20:50 00: By the way, I've not used Jest before. It's not true today, but it was true the first time I did this. But it makes sense, no? Based on what we have seen.
00:21:00 - 00:21:00 00: So this really is about input parameters.
00:21:00 - 00:21:30 00: And milliseconds is not our input parameter. So if I remove this, and I say release version, and it suggests me one possible value for the unit test. And if I say target environment, it suggests me something for the unit test. But for a new unit test, production sounds great to me. So I'm going to change this to development. I used to do this because I wanted you to notice that later, it will really interpret that as development.
00:21:30 - 00:21:50 00: Not like, I suggested production, and then I suggest production again. I change it to development. It will remember, and the next time you will see that it will connect and put development also in the code. So these are the input parameters. We are run the mock, and then we are going to verify.
00:21:50 - 00:21:50 00: the outputs. So what are the outputs? And this is really one of the things that still fascinates me.
00:22:00 - 00:22:00 00: it completed the expected value.
00:22:00 - 00:22:00 00: Based on what we have typed here,
00:22:00 - 00:22:10 00: and the actual input parameter. And now, you know, I try to trick this. So target environment, leave from open Slava.
00:22:20 - 00:22:20 00: Let's see.
00:22:20 - 00:22:20 00: Now let's come back here and say I expect
00:22:20 - 00:22:20 00: that you call info the second time.
00:22:30 - 00:23:00 00: And the second time is from Open Slava development. So it's really connecting what I'm doing in one file and in the corresponding test file. So this is one of the things that I first learned when working with Copilot that is very good in helping us to create unit tests, always with the word of caution. If you create the unit test after the code, the unit test is probably going also to be grown if your code is grown. So always.
00:23:00 - 00:23:00 00: Take this with a piece of salt, but it's clearly helping a lot in the process.
00:23:00 - 00:23:20 00: So this is for the input parameters. And now let's see the output. So we have time, which is kind of a regular expression. What about the other output parameters? So I expect the output the second time it call with release status success.
00:23:20 - 00:23:20 00: And the third one.
00:23:30 - 00:23:40 00: target URL example.com. So as you can see, it has inferred all the things that I needed to put there in terms of expected result for my unit test. So if we have done this well, let's see. Oh, no. And the second test case, I'm going to remove it. We don't need it for now.
00:23:40 - 00:23:50 00: OK, so now we have this.
00:23:50 - 00:23:50 00: If you remember, the next instruction was run npm build. So I'm going to run npm build.
00:24:00 - 00:24:00 00: Sorry, npm run build.
00:24:00 - 00:24:30 00: If I do this, there is an error. Not perfect, but you know, based on the training data, the system thinks that that was really the sensible command to run. It just happened that in this template, NPM is set differently to many other projects. But again, I have here the hint, NPM run. I see the target, and I can say, OK, probably what I need to do is just to run all the things, so I'm sure or not if we are good to go.
00:24:30 - 00:24:40 00: So now we have formatted the code. The TypeScript is being transpiled into JavaScript. Now we are running the test with Jest.
00:24:40 - 00:24:50 00: And we have all the tests passed. So this means that we are now ready to do our first commit and see what happens. So let's.
00:24:50 - 00:24:50 00: at everything,
00:24:50 - 00:24:50 00: Let's commit.
00:24:50 - 00:25:00 00: Initial commit with the help of Copilot, and push the change.
00:25:00 - 00:25:00 00: Okay, so now let's go
00:25:00 - 00:25:00 00: to the repository again.
00:25:10 - 00:25:10 00: If I click in actions,
00:25:10 - 00:25:30 00: Then I see four actions being executed. These are the four actions that came with the template. They are going to evaluate the security of the code, the linting, the formatting. And there is also a continuous integration workflow to test the actual action.
00:25:30 - 00:25:50 00: This is going to take a few seconds, but let's check in the continuous integration, which is really the one that we want to verify. OK, so it seems to run great, but there is something here. Can you read it in the bottom? It's in the bottom, but it says, unexpected input milliseconds.
00:25:50 - 00:25:50 00: Any guess what's happened?
00:25:50 - 00:25:50 00: No?
00:25:50 - 00:26:00 00: We have not modified the workflow. So the test data, whatever it was that came with the template, is still there.
00:26:00 - 00:26:30 00: OK, so again, the suggestions may not be complete. There are bits that may be lost. But we have, fortunately, the rest of the workflow and the tools to help us to connect that. So this happened here. We also should have, it usually takes a bit more time, but the link code base will also warn us that there is this mismatch between the code and the workflow.
00:26:30 - 00:26:40 00: The actual tools will always be there to help us gain trust in what we are putting with the assistant because using may not be complete. So let's go back then to the IDE and let's fix that.
00:26:40 - 00:26:50 00: So I could be super dumb. I don't know where the workflows are. So we can ask.
00:26:50 - 00:26:50 00: Well,
00:26:50 - 00:26:50 00: Are the workflows located in this project?
00:27:00 - 00:27:00 00: Okay?
00:27:00 - 00:27:20 00: Again, we have the workspace hint, so it's looking at my actual code. And it tells me that workflows are in the workflows directory. So I click, go here, and check the ci.yaml that we have not modified. As we can see here, exactly milliseconds. We didn't modify this.
00:27:20 - 00:27:20 00: So again, input parameters. So release version.
00:27:20 - 00:27:30 00: Let's change this. Let's put 001.
00:27:30 - 00:27:30 00: And target environment, staging. I am also going to change it. It goes to be CI test.
00:27:30 - 00:27:50 00: And now let's also modify the output parameters. But I really would like to have multiple echoes, not just one big string. So I'm going to ask, how can I add a multi-line?
00:27:50 - 00:28:00 00: run, multi-line commands in the run.
00:28:00 - 00:28:00 00: section.
00:28:00 - 00:28:10 00: So it's going to infer what I'm trying to do and provides me with the precise thing I needed, which is place here this bar. OK, there's a bar. And then put all the commands that you need.
00:28:20 - 00:28:30 00: Oh, that's OK. Oh, that's OK. So again, completed the infer my intention and connected everything with the project. So now we are ready to get this.
00:28:30 - 00:28:40 00: Let's do the NPM run also. Everything is formatted, and we ensure that it's OK.
00:28:40 - 00:28:40 00: Okay.
00:28:40 - 00:28:50 00: Let's add the file. Let's commit fixing the CI workflow.
00:28:50 - 00:28:50 00: And let's put that change.
00:28:50 - 00:29:20 00: If we came back to the repository and actions, by the way, you can see this red, which is what I mentioned. There is also a LinkedIn warning that I was passing a parameter that was not in the action. So even if I didn't look at the exact info log in the action, I will have caught this. But now we have this next iteration in which the continuous integration workflow should be working. So if we click here.
00:29:20 - 00:29:30 00: We can see the test local action. We can see our two eco-statements and the outputs with the hard-coded values, which is great, because in just
00:29:30 - 00:29:50 00: 12, 15 minutes, I've been able to do the hello world of the action. It's capable of taking some parameters, execute the process, give me some outputs. So we have this first iteration, which is great. It's great.
00:29:50 - 00:29:50 00: But actually, we need to do more, no? So let's try to do that. We still have some minutes.
00:29:50 - 00:30:20 00: OK, so we have a continuous integration workflow, but this is really not going to execute as this. What we want is something different. So we want a workflow that runs when someone creates an issue with a release label, and someone comments on that issue with either a slash approve or a slash cancel comment.
00:30:20 - 00:30:30 00: So the workflow should just get who is approving and do the release, or who is canceling and canceling the release. So I need a workflow that runs in that precise moment. So for one second, let's imagine that I don't know anything about GitHub Action and Workflows. I'm going to ask.
00:30:30 - 00:30:30 00: So let's ask.
00:30:40 - 00:30:40 00: So I want to have a workflow.
00:30:40 - 00:30:40 00: that runs.
00:30:40 - 00:30:50 00: when an issue with the label
00:30:50 - 00:30:50 00: Release has a comment.
00:30:50 - 00:30:50 00: if the comment is
00:30:50 - 00:31:00 00: Approve.
00:31:00 - 00:31:00 00: of...
00:31:00 - 00:31:00 00: Action will execute the workflow.
00:31:00 - 00:31:10 00: will execute the release action.
00:31:10 - 00:31:10 00: Could you give...
00:31:10 - 00:31:20 00: me the code for that. Let's see if this works or not. I've changed a bit the phrase, but it should be working. So the first is that we have here the YAML file.
00:31:20 - 00:31:40 00: Win is going to run when someone comments an issue and creates a comment. And then it's going to provide the filter if the name of the label is released, because it should be an issue of type release. And there is a comment with a slash approved format. Then it will run.
00:31:40 - 00:32:10 00: the actual release process. So it looks good. It looks good. Even this time, it has used the correct checkout version. Sometimes gives you an older version. Based on training data, sometimes it gives you B2, B3. This time has been good enough and give me the action. So in this case, let's click here and insert into a new file. It's a completely new file. Let's save this.
00:32:10 - 00:32:10 00: file in the workflows folder, and we are going to name it doRelease.yaml.
00:32:10 - 00:32:30 00: Actually, I now think that not only creating, also when this is edited. Because someone can make a mistake, make a typo, so edit the comment and fix it.
00:32:30 - 00:32:40 00: There is a thing I'm going to add just to save one iteration for the sake of time. If I don't add anything here, I'm going to get later an error because of permissions. OK?
00:32:40 - 00:32:40 00: Sure.
00:32:40 - 00:32:50 00: As I already know that, but I have forgotten the syntax, I'm going to ask, how can I provide the right permissions for this workflow?
00:33:00 - 00:33:00 00: And it's going to tell me that probably you need to read content and write issues. So that's great. Actually, this is perfect. I'm going to add this here.
00:33:00 - 00:33:10 00: And then we have this thing, which is quite interesting. This is an old syntax in GitHub. This doesn't work anymore, and the IDE knows.
00:33:20 - 00:33:20 00: Sometimes it gives the right answer the first time. This is not the case. So I'm going to ask, could you double check
00:33:20 - 00:33:30 00: the correct syntax for the
00:33:30 - 00:33:30 00: Job filter.
00:33:30 - 00:33:50 00: It is not working. You can see the red sign there. OK, now it gives the right syntax. OK, so I'm going to take the right syntax here. I'm going to remove this. So if the label contains release,
00:33:50 - 00:34:00 00: And the comment is a proof probably also going to change this into contain. So for someone who wants to add something after the proof, I don't want to be super, super strict with that.
00:34:00 - 00:34:10 00: So we have here. So if this contains these things, let's run this. And for now, we are just getting this.
00:34:10 - 00:34:20 00: This, OK, of course, this should come from the issue body. But let's do this iteration.
00:34:20 - 00:34:20 01:
00:34:20 - 00:34:30 00: Fortunately, for the sake of time, we don't have the time to do the next one. But I will give you a hint. OK, so now we do this. So another thing I want to do is I want to
00:34:30 - 00:34:30 00: Um...
00:34:40 - 00:34:40 00: Ah, with the spaces. I want to close the issue. So I'm doing the actual release, and then I close the issue. I don't need it anymore. So let's close the issue.
00:34:50 - 00:35:00 00: As you can see, immediately infers what I'm trying to do and gives me the right context, sorry, the right command with the GitHub CLI to close the issue. However, there is a problem. There is no stocking here to do the connection.
00:35:00 - 00:35:10 00: Could you double check the GitHub token is added?
00:35:10 - 00:35:20 00: If I do this, it will look again into the training data, and it's going to infer that, yes, correct, the GitHub token environment variable is missing. And it's going to give me
00:35:20 - 00:35:30 00: the part that it was really missing here. So if I add it here, we now have our workflow. OK.
00:35:30 - 00:35:30 00: Kind of looks good.
00:35:40 - 00:35:40 00: I think so. I think so. So let's now come here again.
00:35:40 - 00:35:50 00: Let's ensure that it's well formatted.
00:35:50 - 00:36:00 00: OK, we don't need the tests. Git add. Git commit. Add the do release workflow.
00:36:00 - 00:36:00 00: and let's push it. When we do this,
00:36:00 - 00:36:10 00: and go to the repo,
00:36:10 - 00:36:20 00: we can see that we have the four familiar workflows running. But there is no this new one, because remember, this new workflow is going to, I mean, if Copilot did it right,
00:36:20 - 00:36:30 00: It's going to jump only when there is this special type of issue with this comment. So let's do this. Let's go to Issues.
00:36:30 - 00:36:40 00: Let's create a new issue. Let's call this release request from open Slava. Let's add a label. I don't have it created, so I'm going to create right now. Save the new release label. It's set there.
00:36:50 - 00:37:00 00: And we don't need right now anymore, OK? If we have time, we will do the next iteration, which is to actually fill in the details with a form, et cetera. If you're interested, I can show you later how it works. So now we have this. And now I'm going to try first to cancel. So if I click here and, ah, no, it's not going to work.
00:37:10 - 00:37:10 00: I've not added the cancel part.
00:37:10 - 00:37:20 00: Oh, that's bad. No problem. I want to cancel the release as well. And look at this. It still fascinates me because it gives me...
00:37:20 - 00:37:20 00: the whole code.
00:37:20 - 00:37:30 00: to close the release. And it has inferred the filters based on the fields that I have before. In Slido, it says slash approve. Now it puts slash cancel.
00:37:30 - 00:37:40 00: Sometimes it really surprised me how it was able to do this in just one shot. But it's correct. It's correct.
00:37:40 - 00:37:50 00: So now let's push the right one. So let's add.
00:37:50 - 00:37:50 00: Let's ensure that this is well formatted.
00:37:50 - 00:38:00 00: NPM, RAM, format, write. I'm not clicking this.
00:38:00 - 00:38:10 00: Sorry. OK. Now it is git add, git commit, add, cancel, release.
00:38:10 - 00:38:10 00: Good push.
00:38:10 - 00:38:10 00: OK, so now we can came here.
00:38:10 - 00:38:20 00: And we can came to the issue. And let's do again the cancel.
00:38:20 - 00:38:20 00: Now let's go to the actions.
00:38:20 - 00:38:20 00: So.
00:38:30 - 00:38:30 00: Of course, the previous one didn't do anything because
00:38:30 - 00:38:40 00: it didn't have any instruction for the slash cancel stuff. But now, we will have a new one, and it go to the cancel release. So I've done something correct.
00:38:40 - 00:39:00 00: Not a Git repository. And this is because, ah, not perfect. It forgotten to add this. It was not perfect, and I didn't notice it has not loaded.
00:39:00 - 00:39:00 00: This morning was generating it completely. But no problem, no problem.
00:39:00 - 00:39:10 00: Just to save some time, I'm going to actually do the approve part. Hopefully I did it right. So let's do the approve.
00:39:10 - 00:39:20 00: Approving this. And now we have a new workflow run.
00:39:20 - 00:39:30 00: In this case, it's going to be in the approved part of the flow. And then let's see if this connects the dots.
00:39:30 - 00:39:40 00: OK, we have C here, OK? So target environment, live from open Slava, the issue was closed. If I came here, the issue was actually closed, OK?
00:39:40 - 00:40:00 00: So well, that's great. That's all we can fit in this time. So the next step will be to create a form, get in the actual input parameters, and then do the actual release, perform something, OK? But I hope that you get the giz of it.
00:40:00 - 00:40:00 00: My point with this was like,
00:40:00 - 00:40:10 00: In these 20, 25, 30 minutes, I've been able to create not the complete stuff. Actually, when I did this, it took me like a couple of days to finally crank it to everything. But if I look at my previous approach to
00:40:20 - 00:40:40 00: learn a new language, I will probably spend like a couple of weeks doing tutorials, doing some course, learning the language, trying to get my heads into, and then start to work in the actual code and try to start navigating a stack overflow and tons and tons of resources. Now, I have this really at my fingertips. The LLMs are very good in correlating data and capturing intention.
00:40:40 - 00:41:00 00: OK? Probably not always very good in some of the details. Also, based on the actual age of the data, some of the things are missing, because it's logical. It don't have the information. Actually, I tried to trick this writing open Slava, not doing anything. And it gives me open Slava 2021. So there is kind of a hint of maybe how old the training data is, at least for that part.
00:41:10 - 00:41:10 00: So some conclusions for me, hopefully also for you.
00:41:10 - 00:41:30 00: So I think that the AI assistants are going to set a new level of abstraction. So we had previously with the compilers, with object-oriented programming, with functional programming, or the ID. So the assistants are going to be like a new level of abstraction. They are going to relieve us of some boring, repetitive task so we can focus on the value-added things. But, and this is important,
00:41:30 - 00:41:50 00: I think that there is no turning over. So this is not just a file that's going to go away in a couple of years. Actually, Copilot right now is incredibly much better than two years ago. So I can figure out how it's going to be in two years. So I really think that there is no turning over. So we just need to learn this new set of tools.
00:41:50 - 00:42:20 00: Another story, when we started working with, when I moved from C to Java, I was always trying to outsmart the compiler in how it was generating the right code for managing memory, et cetera, until I give the trust the compiler is much better than myself in managing memory. So let the compiler do what it does best. I think that we are in a similar moment right now. But software engineers, we are still at the helm.
00:42:20 - 00:42:30 00: It's a co-pilot, not a pilot. And you can see it provides you hints. Sometimes it's good. Sometimes they are not complete. Sometimes they are a failure. But that is not what matters. What matters is that many times it's correct and speed up the process.
00:42:40 - 00:42:50 00: There is also an impact, a learning course. I lied in the title of the talk. I'm not a proficient TypeScript developer.
00:42:50 - 00:42:50 00: I feel that I don't really learn TypeScript. But should I care? I don't know Assembler anymore.
00:43:00 - 00:43:20 00: And I don't feel like less of a software engineer, because I don't know any more assembler. So again, this is kind of a new level of abstraction. And always remember, we do much more than just coding. OK? And with that, thank you. Not sure if we have any questions. I ran everything I had. So sorry about that. GABRIEL SANCHEZ- Give a round of applause. Jorge Hidalgo.
Dĺžka 00:43:30
Reč 00:37:00
Vytvorené 2025-07-16 23:27:38
Spracované 2025-07-16 23:40:09