Code
GitHub and pull requests
Work on the issues, pull requests and commits of your GitHub repository from the code editor.
The GitHub view of the code editor links your project to a GitHub repository. You push and pull, browse and open issues and pull requests, review and merge, and follow the commits and workflow runs on GitHub, without leaving Lyna. The full guide is on the GitHub integration page.
What you can do
- Create a repository for your project, or link one you already have.
- Push your commits, pull the changes made on GitHub, and see if your branch is in sync.
- Filter and search the issues and pull requests of the repository.
- Open an issue or a pull request as a page in the editor area: comment, edit, label, assign, close or reopen it.
- Review a pull request, merge it, or turn it into a draft and back.
- Create issues and pull requests with labels, assignees, a milestone and reviewers.
- See the commits on GitHub as a graph, and the workflow runs and deployments.
- Add a workflow from a template that runs your project's own scripts.
Open the GitHub view
Open the view
In Code mode, choose GitHub in the views rail.
Connect GitHub
Choose Connect GitHub and install the Lyna GitHub App on your account or organization. You choose which repositories it can reach.
Create or link
- Create Repository: pick the Owner (your personal account or an organization), a Repository name, and Public or Private.
- Link Existing Repository: search your repositories, or type
owner/repo.
To stop syncing, choose Unlink Repository in More GitHub actions. This removes the link, not the repository on GitHub.
The four tabs
| Tab | What it shows |
|---|---|
| Pull requests | Each pull request with its state (Open, Draft, Merged, Closed), its checks and its review state. |
| Issues | Each issue with its labels, assignees and comment count. |
| Commits | The commits on GitHub, drawn as the same graph as Source Control. |
| Activity | The workflow runs (Succeeded, Failed, In Progress, Queued...) and the deployments. A run opens its page with its jobs, steps and log, where you can cancel or re-run it (details). New Workflow adds a workflow from a template: checks on each push, a scheduled or manual script, or a deploy, on a new branch with its pull request or on the current branch (details). |
In Pull requests and Issues, Show picks Open, Closed or All, the search field finds items by their words, and the list loads more items as you scroll.
Open GitHub graph, next to Check sync status at the top of the view, opens every branch on GitHub with its commits in the editor area, with Fetch, Pull and Push in its toolbar (details).
Issue and pull request pages
Choose a row to open its page in the editor area, beside your files. The page holds the description and the comments, a Markdown comment box with Write and Preview, and the side details: assignees, labels, milestone, and the branches and pull requests linked to an issue.
- Close issue, Close as not planned and Reopen issue change an issue's state.
- Create a branch makes a branch for an issue on GitHub, ready to switch to.
- Send to AI puts the issue's text in the chat box for Lyna AI. Nothing is sent until you send it.
- A pull request page adds its reviewers, its checks and the merge box: Merge pull request, Squash and merge or Rebase and merge, then Delete branch.
Review a pull request
On a pull request page, choose Review changes. The review opens in the editor area with the pull request's title and number, the branch it merges into, and Back to PRs to return to its page.
Read the changes
Files lists each changed file with its status, its added and removed lines and its number of comments. Choose a file to go to its diff. The comments already left show as threads under their lines, and a thread on lines that changed since reads Outdated.
Comment on a line
Select a line of the diff. Write in Leave a review comment, under Comment on and the file and line, then choose Post comment. To answer a thread, write in Reply to this thread and choose Reply.
Fix a file in place
Choose Edit in a file's header to change it right in the review, then Save: Lyna commits the file to the pull request's branch. Cancel drops the edit. You edit one file at a time, and a binary or very large file cannot be edited here. If the file changed on the branch since you opened it, the save stops and says so.
Submit your review
Write a summary in Add Comment, then open Submit Review and choose Comment, Approve or Request Changes.
To find issues in your own changes before you open a pull request, run Agent Review.
Create an issue or a pull request
- New Issue in the Issues tab opens a new issue page: a Title, a Markdown Description, and its assignees, labels and milestone. Choose Create Issue.
- Create Pull Request in the Pull requests tab opens a new pull request page. Pick the Base branch and the From branch, write the Title and the Description, add reviewers, then choose Create Pull Request, or Create Draft Pull Request in More ways to create.
New pages stay open as drafts while you look at something else, and the created item takes the page's place.
Push and pull
The view shows the sync status of your branch: Up to date, how many commits it is ahead of GitHub or behind it, or Not on GitHub yet. Check sync status reads it again.
- Push sends your commits to GitHub.
- Pull brings in commits from GitHub. Pull with Rebase puts your local commits on top of them.
- Force Push replaces the history on GitHub with yours.
Only committed work is pushed. Commit your changes in Source Control first.
FAQ
Related
Need help?
Ask the team, read what changed, or learn from the blog.