Part of lp.code.interfaces.gitref View In Hierarchy
Known subclasses: lp.code.interfaces.webservice.IGitRef
Attribute | repository_url | The repository URL, if this is a reference in a remote repository. |
Attribute | name | A shortened version of the full path to this reference, with any leading refs/heads/ removed. |
Attribute | url_quoted_name | The reference name, quoted for use in URLs. |
Choice | object_type | Undocumented |
Attribute | author | The author of the commit pointed to by this reference. |
Datetime | author_date | Undocumented |
Attribute | committer | The committer of the commit pointed to by this reference. |
Datetime | committer_date | Undocumented |
Text | commit_message | Undocumented |
TextLine | display_name | Display name of the reference. |
Attribute | displayname | Copy of display_name for IHasMergeProposals views. |
TextLine | commit_message_first_line | Undocumented |
Attribute | identity | The identity of this reference. This will be the shortened path to the containing repository, plus a colon, plus the reference path with any leading refs/heads/ removed; for example, launchpad:master. |
Attribute | unique_name | The unique name of this reference. This will be the unique name of the containing repository, plus a colon, plus the reference path with any leading refs/heads/ removed; for example, ~launchpad-pqm/launchpad:master. |
Attribute | repository_type | The type of the repository containing this reference. |
Attribute | owner | The owner of the repository containing this reference. |
Attribute | target | The target of the repository containing this reference. |
Attribute | namespace | The namespace of the repository containing this reference, as an IGitNamespace . |
Method | getCodebrowseUrl | Construct a browsing URL for this Git reference. |
Method | getCodebrowseUrlForRevision | Construct a browsing URL for this Git at the given commit |
Attribute | information_type | The type of information contained in the repository containing this reference. |
Bool | private | The repository containing this reference is visible only to its subscribers. |
Method | visibleByUser | Can the specified user see the repository containing this |
Method | transitionToInformationType | Set the information type for this reference's repository. |
Attribute | reviewer | The person or exclusive team that is responsible for reviewing proposals and merging into this reference. |
Attribute | code_reviewer | The reviewer if set, otherwise the owner of the repository containing this reference. |
Method | isPersonTrustedReviewer | Return true if the reviewer is a trusted reviewer. |
Attribute | subscriptions | GitSubscriptions associated with the repository containing this reference. |
Attribute | subscribers | Persons subscribed to the repository containing this reference. |
Method | subscribe | Subscribe this person to the repository containing this reference. |
Method | getSubscription | Return the GitSubscription for this person. |
Method | unsubscribe | Remove the person's subscription to this reference's repository. |
Method | getNotificationRecipients | Return a complete INotificationRecipientSet instance. |
Attribute | landing_targets | A collection of the merge proposals where this reference is the source. |
Attribute | landing_candidates | A collection of the merge proposals where this reference is the target. |
Method | getPrecachedLandingTargets | Return precached landing targets. |
Method | getPrecachedLandingCandidates | Return precached landing candidates. |
Method | addLandingTarget | Create a new BranchMergeProposal with this reference as the source. |
Method | createMergeProposal | Create a new BranchMergeProposal with this reference as the source. |
Method | getMergeProposals | Return matching BranchMergeProposals. |
Method | getDependentMergeProposals | Return BranchMergeProposals dependent on merging this reference. |
Attribute | pending_updates | Whether there are recent changes in this repository that have not yet been scanned. |
Method | getCommits | Get commit information from this reference. |
Method | getLatestCommits | Return a specific number of the latest commits in this ref. |
Attribute | has_commits | Whether this reference has any commits. |
Method | getBlob | Get a blob by file name from this reference. |
Method | getLatestScanJob | Return the last IGitRefScanJobSource for the repository |
Method | rescan | Force a rescan of the repository |
Parameters | information_type | The InformationType to transition to. |
user | The IPerson who is making the change. | |
verify_policy | Check if the new information type complies
with the IGitNamespacePolicy . |
reviewer
is a trusted reviewer.
The reviewer is trusted if they either own the repository containing this reference, or are in the team that owns the repository, or they are in the review team for the repository.
Parameters | person | The Person to subscribe. |
notification_level | The kinds of repository changes that cause notification. | |
max_diff_lines | The maximum number of lines of diff that may appear in a notification. | |
code_review_level | The kinds of code review activity that cause notification. | |
subscribed_by | The person who is subscribing the subscriber. Most often the subscriber themselves. | |
Returns | A new or existing GitSubscription . |
Parameters | person | The person or team to unsubscribe from the repository. |
unsubscribed_by | The person doing the unsubscribing. |
The INotificationRecipientSet instance contains the subscribers and their subscriptions.
Target and prerequisite repositories are preloaded.
Source and prerequisite repositories are preloaded.
Both the target and the prerequisite, if it is there, must be references whose repositories have the same target as the source.
References in personal repositories cannot specify merge proposals.
Parameters | registrant | The person who is adding the landing target. |
merge_target | Must be another reference, and different to self. | |
merge_prerequisite | Optional, but if it is not None it must be another reference. | |
date_created | Used to specify the date_created value of the merge request. | |
needs_review | Used to specify the proposal is ready for review right now. | |
description | A description of the bugs fixed, features added, or refactorings. | |
review_requests | An optional list of (Person , review_type). |
Both the merge_target and the merge_prerequisite, if it is there, must be references whose repositories have the same target as the source.
References in personal repositories cannot specify merge proposals.
Parameters | start | The commit to start listing from. |
limit | If not None, return no more than this many commits. | |
stop | If not None, ignore this commit and its ancestors. | |
union_repository | If not None, resolve commit identifiers in
this repository as well (particularly useful with stop ). | |
start_date | If not None, ignore commits before this date. | |
end_date | If not None, ignore commits after this date. | |
handle_timeout | If True and the backend request times out, synthesise commit information from what we have in the database. | |
logger | An optional logger. | |
Returns | An iterable of commit information dicts. |