-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'JabRef:main' into Ignore-initial-unprotected-uppercase
- Loading branch information
Showing
20 changed files
with
164 additions
and
340 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ows/GreetingFirstTimeCodeContribution.yml → .github/workflows/add-greeting-to-issue.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: GreetingFirstTimeCodeContribution | ||
name: Add greeting to issues for first time contributors | ||
|
||
on: | ||
issues: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Add to Project on Label | ||
|
||
on: | ||
issues: | ||
types: [labeled] | ||
|
||
jobs: | ||
add-to-project: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "good first issue" | ||
if: "${{ github.event.label.name == 'good first issue' }}" | ||
env: | ||
GH_TOKEN: ${{ secrets.PROJECT_TOKEN }} | ||
run: | | ||
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") | ||
gh project item-add 5 --owner jabref --url $ISSUE_URL | ||
- name: needs-refinement | ||
if: github.event.label.name == 'needs-refinement' | ||
env: | ||
GH_TOKEN: ${{ secrets.PROJECT_TOKEN }} | ||
run: | | ||
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") | ||
gh project item-add 15 --owner jabref --url $ISSUE_URL | ||
- name: "status: freeze" | ||
if: "${{ github.event.label.name == 'status: freeze' }}" | ||
env: | ||
GH_TOKEN: ${{ secrets.PROJECT_TOKEN }} | ||
run: | | ||
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") | ||
gh project item-add 9 --owner jabref --url $ISSUE_URL | ||
- name: ui | ||
if: "${{ github.event.label.name == 'ui' }}" | ||
env: | ||
GH_TOKEN: ${{ secrets.PROJECT_TOKEN }} | ||
run: | | ||
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH") | ||
gh project item-add 8 --owner jabref --url $ISSUE_URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,23 @@ | ||
package org.jabref.gui; | ||
|
||
import java.util.Optional; | ||
import java.util.UUID; | ||
|
||
import javafx.stage.Screen; | ||
|
||
import org.jabref.logic.util.BuildInfo; | ||
import org.jabref.model.strings.StringUtil; | ||
import org.jabref.preferences.TelemetryPreferences; | ||
|
||
import com.google.common.base.StandardSystemProperty; | ||
import com.microsoft.applicationinsights.TelemetryClient; | ||
import com.microsoft.applicationinsights.TelemetryConfiguration; | ||
import com.microsoft.applicationinsights.telemetry.SessionState; | ||
|
||
public class Telemetry { | ||
private static TelemetryClient telemetryClient; | ||
|
||
private Telemetry() { | ||
} | ||
|
||
public static Optional<TelemetryClient> getTelemetryClient() { | ||
return Optional.ofNullable(telemetryClient); | ||
return Optional.empty(); | ||
} | ||
|
||
private static void start(TelemetryPreferences telemetryPreferences, BuildInfo buildInfo) { | ||
TelemetryConfiguration telemetryConfiguration = TelemetryConfiguration.getActive(); | ||
if (!StringUtil.isNullOrEmpty(buildInfo.azureInstrumentationKey)) { | ||
telemetryConfiguration.setInstrumentationKey(buildInfo.azureInstrumentationKey); | ||
} | ||
telemetryConfiguration.setTrackingIsDisabled(!telemetryPreferences.shouldCollectTelemetry()); | ||
telemetryClient = new TelemetryClient(telemetryConfiguration); | ||
telemetryClient.getContext().getProperties().put("JabRef version", buildInfo.version.toString()); | ||
telemetryClient.getContext().getProperties().put("Java version", StandardSystemProperty.JAVA_VERSION.value()); | ||
telemetryClient.getContext().getUser().setId(telemetryPreferences.getUserId()); | ||
telemetryClient.getContext().getSession().setId(UUID.randomUUID().toString()); | ||
telemetryClient.getContext().getDevice().setOperatingSystem(StandardSystemProperty.OS_NAME.value()); | ||
telemetryClient.getContext().getDevice().setOperatingSystemVersion(StandardSystemProperty.OS_VERSION.value()); | ||
telemetryClient.getContext().getDevice().setScreenResolution(Screen.getPrimary().getVisualBounds().toString()); | ||
|
||
telemetryClient.trackSessionState(SessionState.Start); | ||
} | ||
|
||
public static void shutdown() { | ||
getTelemetryClient().ifPresent(client -> { | ||
client.trackSessionState(SessionState.End); | ||
client.flush(); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.jabref.gui; | ||
|
||
import java.util.Map; | ||
|
||
public class TelemetryClient { | ||
public void trackEvent(String actionName) { | ||
} | ||
|
||
public <K, V> void trackEvent(String actionName, Map<K, V> source, Map<K, V> of) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 0 additions & 116 deletions
116
src/main/java/org/jabref/gui/logging/ApplicationInsightsLogEvent.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.