Intland's free requirements, development and test management hosting.
This server hosts 90.500 users on the cloud!
Evaluation only! Not for production use!
Supporting Pull Requests#17763/v4
more
Tags:  not added yet

Supporting Pull Requests[Tasks-17763]

Tracker: Tasks Priority: HighestHighest Status: --
Submitted by: zkoppany Jun 15, 2011 07:02 Modified by: ilya_ivanov Sep 27, 2011 14:19 Owner: aron.gombas
Assigned to: ilya_ivanov Jun 15, 2011 07:02 Start Date: -- End Date: --
Estimated Hours: -- Spent Effort: -- % Spent / Plan: --
Category: -- Severity: -- Resolution: Partly Implemented
Release: --
Relations (1)
icon Pull Request merging work flow change request is depended on by this task association
Description
We need a similar pull-request support like on the WEB UI however less powerful (at least at the beginning).

The goal is supporting pull requests for MercurialEclipse and Egit but the changes on the core plugins must be as small as possible.

We need a new menu entry such as Team->Pull Requests.... Here a new dialog appears showing all pending pull requests available on hosts having codebeamer task repositories.

Above the pull-request entries pop-up options must be provided:

  1. Merge Pull Request: the result (successful or conflict) of executing the request must be displayed on a new modal dialog.
  2. Pulling pull-requests changes into a local repository. This is especially useful of the pull-requests cannot be executed because of conflicts. Here the locally available (with same type) repositories must be selectable.

The available pull-requests are provided by the codebeamer-5.7 remote-api and also the pull-request must be executed using the remote-api:

	// - pull request management ----------------------------------------------

	/**
	 * Creates a new pull request.
	 * The properties inaccessible by the remote user are ignored.
	 * @return the pull request created, with its new identifier.
	 * @since 5.7
	 */
	public ScmPullRequestDto createPullRequest(String token, ScmPullRequestDto pullRequest) throws IllegalArgumentException, AccessRightsException, ChangeVetoedException, TimeoutException;

	/**
	 * Updates an existing pull request.
	 * The properties inaccessible by the remote user are ignored.
	 * @since 5.7
	 */
	public void updatePullRequest(String token, ScmPullRequestDto pullRequest) throws IllegalArgumentException, AccessRightsException, ChangeVetoedException, TimeoutException;

	/**
	 * Returns the pull request with the given identifier.
	 * The properties inaccessible by the remote user are not returned.
	 * @param pullRequestId identifier of the pull request.
	 * @since 5.7
	 */
	public ScmPullRequestDto findPullRequestById(String token, Integer pullRequestId);

	/**
	 * Returns the pending pull request by specifying its source and target, or <code>null</code> if there is no pending
	 * pull request existing between those endpoints.
	 * @since 5.7
	 */
	public ScmPullRequestDto findPendingPullRequestByEndPoints(String token, Integer sourceScmRepositoryId, String sourceBranch, Integer targetScmRepositoryId, String targetBranch);

	/**
	 * Returns all pull requests in any repository of any project that is accessible by the given user.
	 * @param userId is identifier of the user who sent or received the pull requests.
	 * @since 5.7
	 */
	public ScmPullRequestDto[] findPullRequestsByUser(String token, Integer userId, Set<ScmPullRequestFilter> filters);

	/**
	 * Find all pull requests in any repository of the specified projects.
	 * @param projectIds are the identifiers of the project to search in.
	 * @since 5.7
	 */
	public ScmPullRequestDto[] findPullRequestsByProject(String token, Integer[] projectIds, Set<ScmPullRequestFilter> filters);

	/**
	 * Find all pull requests in the specified (target) repositories.
	 * @param repositoryIds are the identifiers of the target repositories to search in.
	 * @since 5.7
	 */
	public ScmPullRequestDto[] findPullRequestsByRepository(String token, Integer[] repositoryIds, Set<ScmPullRequestFilter> filters);

	/**
	 * Returns the list of merge conflicts (the actual file paths) that would be the result of the pull request merged
	 * at the moment of calling this method, or an empty array in case of "no conflicts".
	 * @param pullRequestId identifier of the pull request.
	 * @since 5.7
	 */
	public String[] findConflictsByPullRequest(String token, Integer pullRequestId) throws ScmException;

	/**
	 * Merges the pull request if there is no conflict, otherwise it does nothing.
	 * @param pullRequestId identifier of the pull request.
	 * @return whether the pull request has been successfully merged. A failed merge can be due to many different reasons,
	 * 		   but in most cases it is simply due to merge conflicts (which is not considered as an "application error", obviously).
	 * @since 5.7
	 */
	public boolean mergePullRequest(String token, Integer pullRequestId);

	/**
	 * Returns the pull request tracker in the project with the given identifier.
	 * @since 5.7
	 */
	public TrackerDto findPullRequestTrackerByProject(String token, Integer projectId);

	/**
	 * Returns the potential integrators who can merge a change into the specified repository.
	 * @param scmRepositoryId is the identifier of the target repository.
	 * @since 5.7
	 */
	public UserDto[] findPotentialIntegratorsByRepository(String token, Integer scmRepositoryId);
Details
Comments & Attachments (5)
Associations (1)
Children (0)
References (0)
History (4)
Baselines (0)
All (4)

Submitter Association Comment
zkoppany
Jun 15, 2011 07:02
This item depends on Pull Request merging work flow