Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Syntax for GitHub Issues

GitHub issues are represented as RepoName-NUMBER in FlexDeploy. For example, demo-1, demo-2 where demo is name of GitHub project. See image below for reference.

Tip

FlexDeploy will accept and show GitHub issues as demo-1, demo-2 etc.

...

Preparing for GitHub Issues with FlexDeploy

You need to create an OAuth Token for

...

use in FlexDeploy. This token will be entered for GitHub Personal Access Token on Issue Tracking Instance.

  1. Go to GitHub and log in as the user you want to comment on GitHub Issues with.

  2. Generate a Personal Access Token in

...

  1. GitHub following this guide: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

  2. Choose an expiration date based on your security policies. Shorter expiration dates will require updating the ITS more frequently.

  3. Choose the following OAuth scopes to comment on and change status of issues:

...

Create Issue Tracking Instance

A GitHub instance looks like this:

...

Fill in the base URL with the GitHub username or org-based URL. This URL should be the one that your projects are sourced out of.

...

Property Name

Property Code

Required

Description

GitHub Base URL

FDGITHUBITS_URL

Yes

GitHub base URL (https://github.com/%7Bowner%7D)

GitHub Base URL is based on GitHub username or organization.

GitHub Username

FDGITHUBITS_USERNAME

Yes

Username should be an account that has access to the

...

repository where issues are managed.

GitHub Personal Access Token

FDGITHUBITS_TOKEN

Yes

Use Personal Access Token

...

The help text assists you with the Base API Path.

Setting Up Folders and Projects to Use the GitHub ITS Instance

Then back in FlexDeploy, set up your folder and project Issue Tracking settings.

...

for the username.

GitHub Base API Path

FDGITHUBITS_BASE_API_PATH

Yes

GitHub base API path (https://api.github.com or https://hostname/api/v3 for GitHub Enterprise)

...

Configure Folder or Project for Issue Tracking

Configure GitHub Issue Tracking Instance on your project or parent folder. Issue Tracking configurations are inherited by sub-folder and projects. This configuration will allow you to integrate GitHub issues with your builds. See Configure Project for Issue Tracking for more details.

Work Item pattern is optional, if specified his will used to parse commit logs work item numbers. Alternatively, you can just prefix work item numbers with # in commit message.

Optionally configure for Comment and/or Status update after build or deploy execution.

Tip

GitHub Issues only accept statuses of open and closed. Other statuses will be ignored.

...

Linking GitHub Issues to FlexDeploy Builds

Now you are ready to link tickets with commits or by manually entering them on GitHub issues with project builds or project packages.

Linking with Commit Messages

Set up your FlexDeploy project or folder with a ticket pattern. The pattern must be GitHub repo name + “-” + issue number.

...

Following this pattern, make a commit message.

...

Push and merge your change.

...

When you create a build, the issue numbers are automatically pulled from your commits.

...

Linking by Manual Entry at Project Build Time

If you are building the project manually, you can also enter issue numbers at build time.

The issue number should be GitHub Repo Name-Issue Number

In this example, it’s maven-project-3.

...

Linking Issues to Project Packages

If you are working with a package-based project, you can associate issues with packages that will live through its build and deployment lifecycle.

Add one or more Issues by clicking the edit package button on the right panel. The dropdown only shows previously linked issues. Type the entire issue key to make a new one. The issue number should be in the format GitHub Repo Name-Issue Number. After saving, all builds and deployments of this package will automatically be associated to that GitHub Issue.

...

. In order to link

  • using commit messages - use the format #issue for example, #demo-1. Or you use demo-1234 in commit message if demo- is setup as work item pattern.

  • manually at build time - just specify work item number(s) on build request form in work items input. Note that # prefix only necessary with commit message.

  • manually with package - just specify work item number(s) on package configuration.

See Associate Work Items to a Build for more information about linking Work Items to builds.

Examples

...