Skip to content

GitHub Integration

The GitHub integration connects a GitHub organization or account to WebWork through the GitHub App. Repositories become WebWork projects and their issues become tasks, GitHub accounts are linked to your members by the email they commit with, and your team’s commits and pull requests appear next to their tracked time in Productivity > Code Activity.

Only the Workspace Owner can connect the GitHub integration.

Executive Managers and Team Managers can only manage the settings, import members and projects. The integration is included in every plan; on the Pro plan, one integration is active at a time.

Before you start

  • On GitHub, you are an owner of the organization, or you connect your own account. A member of an organization can only request the App; an organization owner approves it on GitHub.
  • A GitHub organization or account connects to one WebWork workspace at a time.

Connect the GitHub App

  1. In Integrations, click Enable on the GitHub App card. The badge tells it apart from the older GitHub integration beside it.
  2. On GitHub, choose the organization or your account, select All repositories or Only select repositories, and click Install.
  3. GitHub asks you to authorize WebWork once, to confirm that you administer the account. Click Authorize.

WebWork opens the GitHub App page with three tabs: Manage Members, Projects and Settings. The line under the title names the connected account and the date, and Open Code Activity opens the report. Until a repository is imported, the card shows Finish setup, which opens Projects.

Link GitHub accounts to members

WebWork lists every GitHub account seen in the repositories the App can reach and matches each to a member by the email address used in its commits. GitHub shares no member’s email address, so an account WebWork has not seen commit yet stays Not linked.

  1. Open Manage Members. The accounts load on their own; reload the page in a minute if the list is still being read. The count shows how many are linked; All, Linked and Not linked filter the list.
  2. Select the accounts to import and click Import. An imported account shows Imported.

A matched account reads Linked before you import it, but its commits are credited to nobody in Code Activity until it is imported. Import links each selected account to the member whose email it commits with. An account with no email match is linked to the one member with the same name, and left alone when several members share that name. An account that matches nobody is invited to the workspace by its commit email. The Owner and Executive Managers invite; a Team Manager’s import links only the members of their teams.

A member who keeps their email private on GitHub commits from a noreply address, which matches nobody. Their commits show under Uncredited commits in Code Activity. Ask them to commit with the email of their WebWork account: Credit commits to the right member.

Import repositories as projects

Each repository you import becomes a WebWork project with the same name, and its issues become the project’s tasks, imported in the background. A pull request never becomes a task. Code Activity reads only the repositories imported as projects.

  1. Open Projects. All, Imported and Not imported filter the list, and the search finds a repository by name.
  2. Select the repositories and click Import. An imported repository shows Imported.

Keep projects in sync

In Settings, under Projects, choose how WebWork follows the repositories the App can reach. Which repositories those are is set on GitHub, in the App’s installation settings.

OptionWhat happens
No auto-syncNothing changes until you import.
Auto-sync new repositoriesA repository the App gains access to, created on GitHub or added in the App’s settings there, becomes a project on its own, with its issues as tasks.
Auto-sync & archive removedThe same, and a repository the App loses access to, or that is deleted on GitHub, archives its project. The project is never deleted: its tasks and tracked time stay, and importing the repository again restores it.

Turn on Code Activity settings

Under Code Activity in Settings, three switches decide what WebWork does with git activity. All three start off, and each change saves at once.

  • Link commits to tasks: WebWork attaches each commit that names a task ID to that task, in the task’s Activity tab, and Code Activity shows the task with the time tracked on it. When the commit message and the branch name point to different tasks, the commit message wins. Turning it off stops new links and keeps the ones made.
  • Show tracked time on pull requests: when a pull request is merged, WebWork comments on it with the time tracked on its task, such as “WebWork: 5h 09m tracked on this task.”
  • Let git events move tasks between statuses: shows the status rules below.

A task’s ID is in the Task Id column in Tasks, such as WEB-42; Copy ID on the task copies it. Put it in the commit message or the branch name; for a pull request, in the branch name or the title. Upper or lower case both work. How the linked work looks in the report: Code Activity.

Status rules

Each rule moves the task a branch, commit or pull request names to the status you pick. Leave a rule on Don’t change to ignore that event.

  • Branch created or pushed to
  • Pull request opened or marked ready for review
  • Pull request merged
  • Pull request merged into the main branch, which overrides the rule above
  • Pull request closed without merging
  • Reviewer requested changes

For a push, WebWork reads the branch name first, then the commit message; for a pull request, the branch name, then the title. A rule acts only in repositories imported as projects, and only when the GitHub account behind the event is linked to a member who may change that task’s status. A closed task is never moved.

See the work in Code Activity

Once the GitHub App is connected, Code Activity appears under Productivity for the Owner, Executive Managers and Team Managers, with a GitHub tab. It reads commits and pull requests from GitHub as you open it and shows them with the linked tasks and the time tracked on them, up to 7 days at a time from the past 12 months. A Team Manager sees their own teams.

The filters, each block of the report and the uncredited commits: Code Activity.

Unlink GitHub

In the integration’s header, open the menu icon in the top right-hand corner and click Unlink GitHub. Only the Owner unlinks. WebWork keeps your data for 12 months, so you can connect again in that period and find it. Imported projects, their tasks and the linked members stay.

The App stays installed on GitHub. To remove it there, open Installed GitHub Apps in your GitHub settings and uninstall WebWork; uninstalling it on GitHub also disconnects it in WebWork.

Was this article helpful?