Editor Tools - page 2

Bringing GraphQL to Octokit.NET

If you’ve built apps that connect with GitHub, you are no doubt familiar with Octokit. GitHub offers three official flavors of the easy-to-use Octokit library—one for Ruby, .NET, and Node.js—that work with the GitHub REST API v3. Back in September of 2016, we announced that we would move to GraphQL, the query language developed by Facebook, in part due to the ability to fetch all of the data we wanted in a single request. As a result, the GitHub API v4 is built on GraphQL instead of REST.

Introducing Octokit.NET in GraphQL

The Editor Tools Team is particularly excited about this move to GraphQL because loading lists of pull requests in Visual Studio through our extension can be time consuming for some projects. We’ve experimented with GraphQL APIs, but we wanted to make it as easy to use as the Octokit.NET library. As such, we are excited to announce the GraphQL flavor of the Octokit.NET library is now available.

Creating a GraphQL-based .NET API presents certain challenges. GraphQL is a query language best suited for dynamic languages. Developers that want to take advantage of GraphQL in statically compiled languages like .NET have to make some compromises, resulting in a much different experience.

This started as an experiment to see if we could use GraphQL’s self documenting functionality to generate a library that gets the benefit of static compilation while retaining the flexibility and spirit of GraphQL. In GitHub for Visual Studio, we perform many round trip queries when displaying pull requests. We’ve used this library in our extension, and it has helped us improve performance, most notably with pull request lists. Before, these lists took minutes to display and now load in under two seconds.

The syntax is designed to look as much like GraphQL as possible while still feeling familiar to .NET developers:

using Octokit.GraphQL;
using Octokit.GraphQL.Core;
using static Octokit.GraphQL.Variable;

var connection = new Connection("https://api.github.com/graphql", YOUR_OAUTH_TOKEN); 

var query = new Query()
    .Select(repo => new

var vars = new Dictionary<string, object>
    { "owner", "octokit" },
    { "name", "octokit.graphql.net" },

var result =  await Connection.Run(query, vars);

Console.WriteLine(result.Login + " & " + result.Name + " Rocks!");

If you want to use the GraphQL API in .NET and make queries in your statically compiled C# code, try out the new GitHub v4 Octokit.NET library.

We’re excited to hear from you. Are you a .NET developer? Is this something that you would find useful? Get in touch with us in our GitHub for Visual Studio repo or on Twitter (@GitHubVS).

Using quantitative and qualitative measurements to improve GitHub’s Editor Tools

The Editor Tools team at GitHub builds tools for other developers, and we often feel like we know what we should build next. Though we often have good instincts, we know that other developers have different workflows and different pain points. We don’t always know how you will discover, use, and understand what we have built.

As such, we’ve started the process of discovering how you use what we build, and where the gaps in our extensions are. Our primary goal is to bring parts of the GitHub experience to your development environment. We’re dedicated to discovering what we can about how you use your developer environment, and how we can improve the way you collaborate with your code and your team.

We’re tackling this in two major ways:

  1. Improving our metrics
  2. Conducting usability studies

Improving how we collect and analyze metrics

The purpose of improving our metrics is to better understand how you use our extensions and how Editor Tools improve your workflow. We recently wrote a blog post about how we gather metrics in Atom, which you can read more about here.

Through collecting metrics around how you work throughout the development cycle, we can identify better ways to support you: the developer. We continue to be dedicated to protecting our users’ privacy and security, and in this process we are only interested in gathering large amounts of information that will give us indicators for the success of the features we create.

Conducting usability studies

We’re conducting usability studies with developers in the community to better understand who you are, how you write code, and how you collaborate with your team. All of this will help us understand how to better support your goals and workflows. If you’d like to learn more about future usability studies, follow us on our various Twitter accounts: GitHub for Visual Studio, GitHub for Unity, and Atom.

Learning from you

We are currently running usability studies around Visual Studio. If you use Visual Studio to develop software in any capacity (side projects, school, career, open source projects, just learning, etc), we want to learn from you! Our usability studies are typically done remotely over video conferencing software. Learn more about this study and sign up to participate.

You can also check out what we are up to in our various open source repositories:

We always welcome new contributions. Look for issues with the “Good First Issues” label in our repositories’ issue trackers to get started.

Announcing GitHub for Unity 1.0

GitHub for Unity 1.0 banner In March 2017 we announced the alpha version of the open source GitHub for Unity editor extension and released the beta version earlier this year. Now, in time for Unite Berlin 2018, GitHub for Unity 1.0 is available for download at unity.github.com and from the Unity Asset Store.

GitHub for Unity is a Unity editor extension that brings Git into Unity 5.6, 2017.x, and 2018.x with an integrated sign-in experience for GitHub users. It introduces two key features for game development teams: support for large files using Git LFS and file locking. These features allow you to manage large assets and critical scene files using Git in the same way that you manage code files, all within Unity.

If you’re at Unite Berlin 2018, don’t miss our GitHub for Unity talk on June 19 at 10:15 am in the Breakout 2 room. Lead developer Andreia Gaita (@shana) will give an overview of GitHub for Unity’s features and explain how to incorporate it into your game development workflow.

What’s new in 1.0

Since releasing the beta version in March 2018, we’ve made new improvements to the user experience and shipped several bug fixes. Version 1.0 also includes:

  • File locking improvements: File locking management is now a top-level view within the GitHub window, giving you the ability to lock or unlock multiple files

locked files image

  • Diffing support: Visualize changes to files with the diffing program of your choice (set in the “Unity Preferences” area) directly from the “Changes” view in the GitHub window

  • Reduced package size: Previously, the package included full portable installations of Git and Git LFS. These are now downloaded when needed, reducing the package size to 1.6MB and allowing us to distribute critical Git and Git LFS updates and patches to you faster and in a more flexible way

  • Notification of updates: Get a notification within Unity whenever a new version is available. You can choose to download or skip the current update

  • Email sign-in: Sign in to your GitHub account with your GitHub username or the email address associated with your account

  • Improved Git and Git LFS support for Mac

  • A Git action bar for essential operations

  • And many bug fixes and improvements throughout

Download the GitHub for Unity 1.0 editor extension from the Unity Asset Store today. In addition to integrating the extension into your game development workflow, we encourage you to join our community by contributing and following our GitHub for Unity repo and chatting with us on Twitter (@GitHubUnity).

Review pull requests from within Visual Studio

The GitHub for Visual Studio Extension team has been running a beta of pull request reviews from within Visual Studio for nearly a month, and we’re very excited to announce the feature has shipped this week!

Viewing, checking out, and reviewing pull requests are part of our every day workflow as GitHub users. And if you develop with Visual Studio, you no longer have to leave your editor to work in pull requests with your team.

What to expect

The most recent release of our extension supports you through these common pull request workflows:

Pull request navigation

  • Quickly view all of the pull requests on the repository you’ve cloned from Team Explorer
  • View the details of a specific pull request and checkout the pull request branch
  • See which pull request is checked out right from the status bar. If you don’t have one checked out, this button will link you back to the list of pull requests


Review code

  • Start a review from the GitHub pane within Visual Studio
  • Open the diff view of files edited within the pull request by clicking on any of the changed files
  • Leave an inline comment, and start a review from that comment
  • Submit a review that comments, approves, or request changes to the pull request

Review Code

Address feedback in Visual Studio

  • Click on a comment in the GitHub pane within Visual Studio to open it in a diff
  • View all of the reviewers for a given pull request
  • View all of the reviews that a specific reviewer has left on a pull request

address feedback

What else is in this release

This release also includes:

  • An enhancement to make navigation from diff to editor view more discoverable
  • A bug fix for GitHub Enterprise users that was causing avatars to be repeatedly downloaded
  • A fix for an initilization bug that caused MEF initialization to slow down Visual Studio extensively
  • A navigation improvement that gives users one-click access to the pull request they’re working on or the list of pull requests if they are not currently on one—even if the GitHub panel is not open
  • An update using GraphQL instead of REST

How you can help

As we continue to build on the GitHub for Visual Studio Extension, we want to know how we can best support the workflows of our users and contributors. Even if you don’t write code in Visual Studio, we’re wondering:

  1. How do you and your teammates communicate in pull requests?
  2. When in an editor, how do you use GitHub.com to: (a) Look at the list of pull requests? (b) Open a new pull request? (c) Look at the details of the pull request you are working on?
  3. When reviewing a pull request, what is important to you? For example, does it matter to you who authors a pull request?

Let us know on Twitter at @GitHubVS or head over to our tracking issue on pull request workflows to share your thoughts and help us improve our features!

Connect with us

If you haven’t already, be sure to follow us on Twitter at @GitHubVS to see what we’re up to or check out our repository and start contributing!

GitHub for Unity Package Beta Release

GitHub for Unity Beta now available

Sadly, GDC 2018 is coming to a close. Tens of thousands of developers visited San Francisco to explore the latest and greatest in the gaming industry—including a large number of Unity developers who might be excited to hear that we’ve released GitHub for Unity Beta to support them through their adventures in game development.

GitHub for Unity Package

Our Unity package provides Unity game developers with the benefits of source control and GitHub without having to switch to the command line. The package already included basic Git support from within Unity and allowed you to use GitHub features in just a few clicks. With our latest update, you can now take advantage of Git LFS and file locking, too.

Git-LFS and file locking

Git-LFS provides a unique experience for game developers. With the ability to store your large asset files outside your repository (but still on GitHub.com servers) your repository becomes a more manageable size, making cloning and fetching much faster. You gain versioning and the same integrated Git workflow you use for text files for large asset files. Git-LFS also brings your team file locking, ensuring your assets are not overwritten or corrupted.

All of our features

  • Unity 5.4 and above on both Mac and Windows
  • GitHub authentication (including 2fa) with HTTPS support
  • Git management added to Unity, providing users with user and email configuration, Git remote configuration, and Git installation path configuration
  • Local repository management including a list of changes, selective commit, and the ability to discard file changes
  • Git and GitHub repository operations including lists of commits with details that can be reverted and branch operations including listing local and remote branches. You can also create and publish new branches, delete existing branches, and of course fetch, push, and pull operations between local and remote
  • File locking with visual locking indicators in the UI within the file, a list of locked files, and notifications when a file is locked by someone else

Open source

And don’t forget, our package is open source. We encourage you to share feedback, report bugs, and contribute where you can! Just visit our GitHub for Unity repository to get started!



Discover new ways to build better

Try Marketplace apps free for 14 days

Learn more