mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 05:21:29 +07:00
AP-8446 [vcs]: dropping descriptions from the codebase
GitOrigin-RevId: 0cf6be8ebdcfeedea09248207e8c90ac4be6d579
This commit is contained in:
committed by
intellij-monorepo-bot
parent
467a156b19
commit
62337bb3d7
@@ -43,7 +43,7 @@ object VcsStatisticsCollector : CounterUsagesCollector() {
|
||||
val CLONED_PROJECT_OPENED = GROUP.registerEvent("cloned.project.opened")
|
||||
|
||||
@JvmField
|
||||
val MORE_VCS_PLUGINS_LINK_CLICKED: EventId = GROUP.registerEvent("more.vcs.plugins.link.clicked", "User clicked 'More VCS plugins' link in VCS dialogs")
|
||||
val MORE_VCS_PLUGINS_LINK_CLICKED: EventId = GROUP.registerEvent("more.vcs.plugins.link.clicked")
|
||||
|
||||
private val CHANGE_LIST_EDITED_PLACE = EventFields.Enum("editingPlace", EditChangeListPlace::class.java)
|
||||
@JvmField
|
||||
|
||||
@@ -88,7 +88,7 @@ public @NonNls class VcsLogFeaturesCollector extends ProjectUsagesCollector {
|
||||
private static final VarargEventId LABELS_SHOW_TAG_NAMES = GROUP.registerVarargEvent("labels.showTagNames", EventFields.Enabled);
|
||||
private static final VarargEventId LABELS_ON_THE_LEFT = GROUP.registerVarargEvent("labels.onTheLeft", EventFields.Enabled);
|
||||
private static final VarargEventId ISSUE_SHOW_PREVIEW_ON_HOVER = GROUP.registerVarargEvent(
|
||||
"issue.showPreviewOnHover", "Tracks enablement of showing issue preview on hover in the VCS log.", EventFields.Enabled);
|
||||
"issue.showPreviewOnHover", EventFields.Enabled);
|
||||
private static final VarargEventId SHOW_COMMIT_DATE = GROUP.registerVarargEvent("showCommitDate", EventFields.Enabled);
|
||||
private static final VarargEventId TEXT_FILTER_REGEX = GROUP.registerVarargEvent("textFilter.regex", EventFields.Enabled);
|
||||
private static final VarargEventId TEXT_FILTER_MATCH_CASE = GROUP.registerVarargEvent("textFilter.matchCase", EventFields.Enabled);
|
||||
|
||||
@@ -23,7 +23,7 @@ import git4idea.repo.GitRepository
|
||||
internal object GitOperationsCollector : CounterUsagesCollector() {
|
||||
override fun getGroup(): EventLogGroup = GROUP
|
||||
|
||||
private val GROUP: EventLogGroup = EventLogGroup(id = "git.operations", version = 9, description = "Git operations")
|
||||
private val GROUP: EventLogGroup = EventLogGroup(id = "git.operations", version = 9)
|
||||
|
||||
internal val UPDATE_FORCE_PUSHED_BRANCH_ACTIVITY = GROUP.registerIdeActivity("update.force.pushed")
|
||||
|
||||
@@ -48,7 +48,6 @@ internal object GitOperationsCollector : CounterUsagesCollector() {
|
||||
"rebase.interactive.log.validation_error",
|
||||
EXPECTED_COMMITS_NUMBER,
|
||||
ACTUAL_COMMITS_NUMBER,
|
||||
description = "Validation error during interactive rebase via log",
|
||||
)
|
||||
private val INTERACTIVE_REBASE_WAS_SUCCESSFUL = EventFields.Boolean("was_successful")
|
||||
private val INTERACTIVE_REBASE_ACTIVITY = GROUP.registerIdeActivity("interactive.rebase",
|
||||
@@ -61,14 +60,12 @@ internal object GitOperationsCollector : CounterUsagesCollector() {
|
||||
|
||||
private val CANT_REBASE_USING_LOG_REASON = EventFields.Enum<CantRebaseUsingLogException.Reason>("cant_rebase_using_log_reason")
|
||||
private val CANT_REBASE_USING_LOG_EVENT = GROUP.registerEvent("cant.rebase.using.log",
|
||||
CANT_REBASE_USING_LOG_REASON,
|
||||
description = "Rebase using log is not possible")
|
||||
CANT_REBASE_USING_LOG_REASON)
|
||||
|
||||
val REBASE_ENTRY_TYPE_FIELDS: Map<String, RoundedIntEventField> = GitRebaseEntry.knownActions.associate {
|
||||
it.command to EventFields.RoundedInt("${it.command}_entries_count")
|
||||
}
|
||||
private val REBASE_START_USING_LOG_EVENT = GROUP.registerVarargEvent("rebase.start.using.log",
|
||||
description = "Rebase started using log",
|
||||
*REBASE_ENTRY_TYPE_FIELDS.values.toTypedArray())
|
||||
|
||||
private val WITH_PROVIDED_BRANCH = EventFields.Boolean("with_provided_branch")
|
||||
@@ -179,7 +176,6 @@ internal object GitOperationsCollector : CounterUsagesCollector() {
|
||||
private val OPTION_AUTOSQUASH = EventFields.Boolean("option_autosquash", "--autosquash")
|
||||
|
||||
private val REBASE_FROM_DIALOG_EVENT = GROUP.registerVarargEvent("rebase.from.dialog",
|
||||
"Rebase from dialog was started",
|
||||
CURRENT_BRANCH,
|
||||
REBASE_ON_TRACKED_BRANCH,
|
||||
UPSTREAM_TYPE,
|
||||
@@ -246,7 +242,6 @@ internal object GitOperationsCollector : CounterUsagesCollector() {
|
||||
private val MERGE_OPTION_ALLOW_UNRELATED_HISTORIES = EventFields.Boolean("option_allow_unrelated_histories", "--allow-unrelated-histories")
|
||||
|
||||
private val MERGE_FROM_DIALOG_EVENT = GROUP.registerVarargEvent("merge.from.dialog",
|
||||
"Merge from dialog was started",
|
||||
MERGE_PULL_TRACKED_BRANCH,
|
||||
MERGE_PULL_OPTION_NO_FF,
|
||||
MERGE_PULL_OPTION_FF_ONLY,
|
||||
@@ -260,7 +255,6 @@ internal object GitOperationsCollector : CounterUsagesCollector() {
|
||||
private val PULL_OPTION_REBASE = EventFields.Boolean("option_rebase", "--rebase")
|
||||
|
||||
private val PULL_FROM_DIALOG_EVENT = GROUP.registerVarargEvent("pull.from.dialog",
|
||||
"Pull from dialog was started",
|
||||
MERGE_PULL_TRACKED_BRANCH,
|
||||
PULL_OPTION_REBASE,
|
||||
MERGE_PULL_OPTION_FF_ONLY,
|
||||
|
||||
@@ -49,7 +49,6 @@ import git4idea.statistics.GitCommitterCounter
|
||||
import git4idea.statistics.RepositoryAvailability
|
||||
import git4idea.ui.branch.dashboard.CHANGE_LOG_FILTER_ON_BRANCH_SELECTION_PROPERTY
|
||||
import git4idea.ui.branch.dashboard.SHOW_GIT_BRANCHES_LOG_PROPERTY
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.time.Period
|
||||
@@ -430,12 +429,7 @@ private fun GitRepository.detectRefFormat(): RefFormat {
|
||||
return RefFormat.UNKNOWN
|
||||
}
|
||||
|
||||
|
||||
private data class RoundedUserCountEventField(
|
||||
override val name: String,
|
||||
@NonNls override val description: String? = null,
|
||||
) : PrimitiveEventField<Int>() {
|
||||
|
||||
private data class RoundedUserCountEventField(override val name: String) : PrimitiveEventField<Int>() {
|
||||
override val validationRule: List<String>
|
||||
get() = listOf("{regexp#integer}")
|
||||
|
||||
@@ -448,4 +442,4 @@ private data class RoundedUserCountEventField(
|
||||
}
|
||||
fuData.addData(name, number)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,45 +27,31 @@ import org.jetbrains.plugins.github.util.GHHostedRepositoriesManager
|
||||
internal class GHPRProjectMetricsCollector : ProjectUsagesCollector() {
|
||||
@Suppress("CompanionObjectInExtension")
|
||||
private companion object {
|
||||
private val GROUP = EventLogGroup(
|
||||
"vcs.github.project", 1,
|
||||
recorder = "FUS",
|
||||
description = "Collects metrics about GitHub Plugin usage."
|
||||
)
|
||||
private val GROUP = EventLogGroup("vcs.github.project", 1)
|
||||
|
||||
private val PR_STATISTICS_ALL = GROUP.registerEvent(
|
||||
"pr.statistics.all",
|
||||
EventFields.RoundedInt("value", description = "Total number of PRs in project (rounded up to the first power of 2)."),
|
||||
description = "#PR statistics: open."
|
||||
)
|
||||
private val PR_STATISTICS_OPEN = GROUP.registerEvent(
|
||||
"pr.statistics.open",
|
||||
EventFields.RoundedInt("value", description = "Total number of open PRs in project (rounded up to the first power of 2)."),
|
||||
description = "#PR statistics: open."
|
||||
)
|
||||
private val PR_STATISTICS_OPEN_AUTHOR = GROUP.registerEvent(
|
||||
"pr.statistics.open.author",
|
||||
EventFields.RoundedInt("value",
|
||||
description = "Total number of open PRs in project authored by the current user (rounded up to the first power of 2)."),
|
||||
description = "#PR statistics: open > author."
|
||||
EventFields.RoundedInt("value", description = "Total number of open PRs in project authored by the current user (rounded up to the first power of 2)."),
|
||||
)
|
||||
private val PR_STATISTICS_OPEN_ASSIGNEE = GROUP.registerEvent(
|
||||
"pr.statistics.open.assignee",
|
||||
EventFields.RoundedInt("value",
|
||||
description = "Total number of open PRs in project assigned to the current user (rounded up to the first power of 2)."),
|
||||
description = "#PR statistics: open > assignee."
|
||||
EventFields.RoundedInt("value", description = "Total number of open PRs in project assigned to the current user (rounded up to the first power of 2)."),
|
||||
)
|
||||
private val PR_STATISTICS_OPEN_REVIEW_ASSIGNED = GROUP.registerEvent(
|
||||
"pr.statistics.open.reviewer",
|
||||
EventFields.RoundedInt("value",
|
||||
description = "Total number of open PRs in project assigned to the current user as reviewer (rounded up to the first power of 2)."),
|
||||
description = "#PR statistics: open > reviewer."
|
||||
EventFields.RoundedInt("value", description = "Total number of open PRs in project assigned to the current user as reviewer (rounded up to the first power of 2)."),
|
||||
)
|
||||
private val PR_STATISTICS_OPEN_REVIEWED = GROUP.registerEvent(
|
||||
"pr.statistics.open.reviewed",
|
||||
EventFields.RoundedInt("value",
|
||||
description = "Total number of open PRs in project reviewed by the current user (rounded up to the first power of 2)."),
|
||||
description = "#PR statistics: open > reviewed."
|
||||
EventFields.RoundedInt("value", description = "Total number of open PRs in project reviewed by the current user (rounded up to the first power of 2)."),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -46,12 +46,10 @@ internal object GHPRStatisticsCollector : CounterUsagesCollector() {
|
||||
//endregion
|
||||
|
||||
//region: Comments
|
||||
private val COMMENTS_RESIZED_EVENT = COUNTERS_GROUP.registerEvent("comments.resized",
|
||||
"The user resized range of a new comment by dragging its outline across the text")
|
||||
private val MULTILINE_COMMENTS_CREATED = COUNTERS_GROUP.registerEvent("multiline.comments.created",
|
||||
"The user created a new comment that spans multiple lines")
|
||||
private val TOGGLED_COMMENTS_EVENT = COUNTERS_GROUP.registerEvent("comments.toggled",
|
||||
"The user toggled visibility of comments on given line in code review")
|
||||
private val COMMENTS_RESIZED_EVENT = COUNTERS_GROUP.registerEvent("comments.resized")
|
||||
private val MULTILINE_COMMENTS_CREATED = COUNTERS_GROUP.registerEvent("multiline.comments.created")
|
||||
private val TOGGLED_COMMENTS_EVENT = COUNTERS_GROUP.registerEvent("comments.toggled")
|
||||
|
||||
fun logResizedComments(project: Project) {
|
||||
COMMENTS_RESIZED_EVENT.log(project)
|
||||
}
|
||||
@@ -253,8 +251,7 @@ internal object GHPRStatisticsCollector : CounterUsagesCollector() {
|
||||
"api.rates",
|
||||
API_REQUEST_OPERATION_FIELD,
|
||||
API_REQUEST_RATELIMIT_USED_FIELD,
|
||||
API_REQUEST_RATELIMIT_GUESSED_FIELD,
|
||||
description = "Event that happens internally after we have tried to determine the rates used for a request."
|
||||
API_REQUEST_RATELIMIT_GUESSED_FIELD
|
||||
)
|
||||
|
||||
fun logApiRequestStart(operation: GithubApiRequestOperation): StructuredIdeActivity =
|
||||
|
||||
@@ -54,39 +54,27 @@ object GitLabStatistics {
|
||||
//endregion
|
||||
|
||||
//region Project
|
||||
private val PROJECT_METRICS_GROUP = EventLogGroup(
|
||||
"vcs.gitlab.project", 1,
|
||||
recorder = "FUS",
|
||||
description = "Collects metrics about GitLab merge requests in a project."
|
||||
)
|
||||
private val PROJECT_METRICS_GROUP = EventLogGroup("vcs.gitlab.project", 1)
|
||||
|
||||
private val PROJECT_METRICS_MR_STATISTICS_ALL = PROJECT_METRICS_GROUP.registerEvent(
|
||||
"mr.statistics.all",
|
||||
EventFields.RoundedInt("value", description = "Total number of MRs in project (rounded up to the first power of 2)."),
|
||||
description = "#MR statistics: open."
|
||||
EventFields.RoundedInt("value", description = "Total number of MRs in project (rounded up to the first power of 2).")
|
||||
)
|
||||
private val PROJECT_METRICS_MR_STATISTICS_OPEN = PROJECT_METRICS_GROUP.registerEvent(
|
||||
"mr.statistics.open",
|
||||
EventFields.RoundedInt("value", description = "Total number of open MRs in project (rounded up to the first power of 2)."),
|
||||
description = "#MR statistics: open."
|
||||
)
|
||||
private val PROJECT_METRICS_MR_STATISTICS_OPEN_AUTHOR = PROJECT_METRICS_GROUP.registerEvent(
|
||||
"mr.statistics.open.author",
|
||||
EventFields.RoundedInt("value",
|
||||
description = "Total number of open MRs in project authored by the current user (rounded up to the first power of 2)."),
|
||||
description = "#MR statistics: open > author."
|
||||
EventFields.RoundedInt("value", description = "Total number of open MRs in project authored by the current user (rounded up to the first power of 2)."),
|
||||
)
|
||||
private val PROJECT_METRICS_MR_STATISTICS_OPEN_ASSIGNEE = PROJECT_METRICS_GROUP.registerEvent(
|
||||
"mr.statistics.open.assignee",
|
||||
EventFields.RoundedInt("value",
|
||||
description = "Total number of open MRs in project assigned to the current user (rounded up to the first power of 2)."),
|
||||
description = "#MR statistics: open > assignee."
|
||||
EventFields.RoundedInt("value", description = "Total number of open MRs in project assigned to the current user (rounded up to the first power of 2)."),
|
||||
)
|
||||
private val PROJECT_METRICS_MR_STATISTICS_OPEN_REVIEW_ASSIGNED = PROJECT_METRICS_GROUP.registerEvent(
|
||||
"mr.statistics.open.reviewer",
|
||||
EventFields.RoundedInt("value",
|
||||
description = "Total number of open MRs in project assigned to the current user as reviewer (rounded up to the first power of 2)."),
|
||||
description = "#MR statistics: open > reviewer."
|
||||
EventFields.RoundedInt("value", description = "Total number of open MRs in project assigned to the current user as reviewer (rounded up to the first power of 2)."),
|
||||
)
|
||||
|
||||
internal class GitLabProjectMetricsCollector : ProjectUsagesCollector() {
|
||||
@@ -297,14 +285,11 @@ object GitLabStatistics {
|
||||
/**
|
||||
* A file was uploaded via Markdown uploads API
|
||||
*/
|
||||
private val PROJECT_FILE_UPLOAD = COUNTERS_GROUP.registerEvent("project.markdown.file.uploaded",
|
||||
"Triggered when a file was uploaded to the project to be used in Markdown text"
|
||||
)
|
||||
private val PROJECT_FILE_UPLOAD = COUNTERS_GROUP.registerEvent("project.markdown.file.uploaded")
|
||||
|
||||
fun logFileUploadActionExecuted(project: Project): Unit = PROJECT_FILE_UPLOAD.log(project)
|
||||
|
||||
private val DISCUSSIONS_TOGGLED = COUNTERS_GROUP.registerEvent("comments.toggled",
|
||||
"The user toggled visibility of discussions on given line in code review")
|
||||
private val DISCUSSIONS_TOGGLED = COUNTERS_GROUP.registerEvent("comments.toggled")
|
||||
|
||||
fun logToggledComments(project: Project) {
|
||||
DISCUSSIONS_TOGGLED.log(project)
|
||||
@@ -484,5 +469,3 @@ internal class GitLabMetricsLoader(private val project: Project) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user