@Component
class GithubSync(val githubDataService: GithubDataService, val issuePileService: IssuePileService, val helper: JsonHelper, val cursorResourceWalkerDataService: CursorResourceWalkerDataService, val imsConfigManager: IMSConfigManager, collectedSyncInfo: CollectedSyncInfo, val loadBalancedDataFetcher: LoadBalancedDataFetcher = LoadBalancedDataFetcher()) : AbstractSync, LoadBalancedDataFetcherImplementation, DataFetcher

This class is responsible for syncing data from and to GitHub

Parameters

githubDataService

The service used to access the database

issuePileService

The service used to access the issue pile

helper

The helper used to convert data to and from JSON

cursorResourceWalkerDataService

The service used to access the cursor resource walker data

imsConfigManager

The manager used to access the IMS config

collectedSyncInfo

The collected sync info

loadBalancedDataFetcher

The load balanced data fetcher

Constructors

Link copied to clipboard
constructor(githubDataService: GithubDataService, issuePileService: IssuePileService, helper: JsonHelper, cursorResourceWalkerDataService: CursorResourceWalkerDataService, imsConfigManager: IMSConfigManager, collectedSyncInfo: CollectedSyncInfo, loadBalancedDataFetcher: LoadBalancedDataFetcher = LoadBalancedDataFetcher())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private val logger: Logger?

private val logger: Logger?

Logger used to print notifications

Functions

Link copied to clipboard
open suspend override fun balancedFetchData(imsProject: IMSProject, generalBudget: GeneralResourceWalkerBudget): List<ResourceWalker>
Link copied to clipboard
open suspend override fun createBudget(): GeneralResourceWalkerBudget
Link copied to clipboard
open suspend override fun createOutgoingIssue(imsProject: IMSProject, issue: Issue): IssueConversionInformation?
Link copied to clipboard
private suspend fun doIncoming(imsProject: IMSProject)
Link copied to clipboard
open suspend fun doOutgoing(imsProject: IMSProject)
Link copied to clipboard
open suspend override fun fetchData(imsProjects: List<IMSProject>)
Link copied to clipboard
private inline suspend fun <T, BT : TimelineItem> findFinalBlock(relevantTimeline: List<BT>, searchLambda: suspend (BT) -> T): List<BT>
Link copied to clipboard
private suspend fun findFinalTypeBlock(relevantTimeline: List<TimelineItem>): List<TimelineItem>
Link copied to clipboard
open suspend override fun findTemplates(): Set<IMSTemplate>
Link copied to clipboard
open suspend override fun findUnsyncedIssues(imsProject: IMSProject): List<IncomingIssue>
Link copied to clipboard
suspend fun gropiusUserList(users: List<User>): List<GropiusUser>
Link copied to clipboard
private suspend fun integrateLabelToState(timelineItems: MutableList<TimelineItem>, rawTimelineItems: List<TimelineItem>, issue: Issue, imsProject: IMSProject)
Link copied to clipboard
private suspend fun integrateLabelToStateAddedLabel(timelineItems: MutableList<TimelineItem>, issue: Issue, imsProject: IMSProject, timelineItem: AddedLabelEvent, lastState: IssueState, mappedStates: List<IssueState>)
Link copied to clipboard
private suspend fun integrateLabelToStateFindCurrentState(issue: Issue, timelineItem: TimelineItem): Pair<Set<Label>, IssueState>
Link copied to clipboard
private suspend fun integrateLabelToStateRemovedLabel(timelineItems: MutableList<TimelineItem>, issue: Issue, imsProject: IMSProject, timelineItem: RemovedLabelEvent, lastState: IssueState, mappedStates: List<IssueState>)
Link copied to clipboard
open suspend override fun isOutgoingAssignmentsEnabled(imsProject: IMSProject): Boolean
Link copied to clipboard
open suspend override fun isOutgoingCommentsEnabled(imsProject: IMSProject): Boolean
Link copied to clipboard
open suspend override fun isOutgoingEnabled(imsProject: IMSProject): Boolean
Link copied to clipboard
open suspend override fun isOutgoingLabelsEnabled(imsProject: IMSProject): Boolean
Link copied to clipboard
open suspend override fun isOutgoingStatesEnabled(imsProject: IMSProject): Boolean
Link copied to clipboard
open suspend override fun isOutgoingTemplatedFieldsEnabled(imsProject: IMSProject): Boolean
Link copied to clipboard
open suspend override fun isOutgoingTitleChangedEnabled(imsProject: IMSProject): Boolean
Link copied to clipboard
open suspend override fun labelStateMap(imsProject: IMSProject): Map<String, String>
Link copied to clipboard
private suspend fun lookupState(id: String?): IssueState?
Link copied to clipboard
private inline suspend fun <AddingItem : TimelineItem, RemovingItem : TimelineItem> shouldSyncType(imsProject: IMSProject, finalBlock: List<TimelineItem>, relevantTimeline: List<TimelineItem>, restoresDefaultState: Boolean, virtualIDs: Map<TimelineItem, String>): Boolean
private suspend fun shouldSyncType(imsProject: IMSProject, isAddingItem: suspend (TimelineItem) -> Boolean, isRemovingItem: suspend (TimelineItem) -> Boolean, finalBlock: List<TimelineItem>, relevantTimeline: List<TimelineItem>, restoresDefaultState: Boolean, virtualIDs: Map<TimelineItem, String>): Boolean
Link copied to clipboard
suspend fun sync()
Link copied to clipboard
open suspend override fun syncAddedLabel(imsProject: IMSProject, issueId: String, label: Label, users: List<User>): TimelineItemConversionInformation?
Link copied to clipboard
open suspend override fun syncComment(imsProject: IMSProject, issueId: String, issueComment: IssueComment, users: List<User>): TimelineItemConversionInformation?
Link copied to clipboard
open override fun syncDataService(): SyncDataService
Link copied to clipboard
open suspend override fun syncFallbackComment(imsProject: IMSProject, issueId: String, comment: String, original: TimelineItem?, users: List<User>): TimelineItemConversionInformation?
Link copied to clipboard
private suspend fun syncIncomingIssue(oldImsProject: IMSProject, incomingIssue: IncomingIssue, dereplicatorRequest: SimpleIssueDereplicatorRequest)
Link copied to clipboard
private suspend fun syncIncomingTimelineItem(imsProject: IMSProject, timelineItem: IncomingTimelineItem, issue: Issue, dereplicatorRequest: SimpleIssueDereplicatorRequest, nodesToSave: MutableList<Node>, savedNodeHandlers: MutableList<suspend (node: Node) -> Unit>)
Link copied to clipboard
private suspend fun syncOutgoingAssignments(timeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation)
Link copied to clipboard
private suspend fun syncOutgoingComments(timeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation)
Link copied to clipboard
private suspend fun syncOutgoingLabels(timeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation)
Link copied to clipboard
private suspend fun syncOutgoingSingleAssignment(relevantTimeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation, assignment: Assignment, virtualIDs: Map<TimelineItem, String>)
Link copied to clipboard
private suspend fun syncOutgoingSingleAssignmentBlock(relevantTimeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation, assignment: Assignment, virtualIDs: Map<TimelineItem, String>, finalBlock: List<TimelineItem>)
Link copied to clipboard
private suspend fun syncOutgoingSingleLabel(relevantTimeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation, label: Label?, virtualIDs: Map<TimelineItem, String>)
Link copied to clipboard
private suspend fun syncOutgoingStateChanges(timeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation)
Link copied to clipboard
private suspend fun syncOutgoingTemplatedFields(timeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation)
Link copied to clipboard
private suspend fun syncOutgoingTitleChanges(timeline: List<TimelineItem>, imsProject: IMSProject, issueInfo: IssueConversionInformation)
Link copied to clipboard
open suspend override fun syncRemovedLabel(imsProject: IMSProject, issueId: String, label: Label, users: List<User>): TimelineItemConversionInformation?
Link copied to clipboard
open suspend override fun syncSingleAssigned(imsProject: IMSProject, issueId: String, assignment: Assignment, users: List<User>): TimelineItemConversionInformation?
Link copied to clipboard
open suspend override fun syncSingleUnassigned(imsProject: IMSProject, issueId: String, assignment: Assignment, users: List<User>): TimelineItemConversionInformation?
Link copied to clipboard
open suspend override fun syncStateChange(imsProject: IMSProject, issueId: String, newState: IssueState, users: List<User>): TimelineItemConversionInformation?
Link copied to clipboard
open suspend fun syncTemplatedField(imsProject: IMSProject, issueId: String, fieldChangedEvent: TemplatedFieldChangedEvent, users: List<User>): TimelineItemConversionInformation?
Link copied to clipboard
open suspend override fun syncTitleChange(imsProject: IMSProject, issueId: String, newTitle: String, users: List<User>): TimelineItemConversionInformation?