Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
garethahealy committed Jan 5, 2024
1 parent 285c8cf commit bd30bdf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
- name: Build native
run: ./mvnw clean install -Pnative --batch-mode

- name: Run help
run: target/github-stats-*-runner help

- name: Upload target
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
with:
Expand Down Expand Up @@ -88,16 +91,16 @@ jobs:
name: target

- name: Run help
run: ls -lrt && target/github-stats-*-runner help
run: github-stats-*-runner help

- name: Run collect-stats for myself
env:
GITHUB_LOGIN: ${{ secrets.GITHUB_TOKEN }}
run: target/github-stats-*-runner collect-stats --organization=garethahealy
run: github-stats-*-runner collect-stats --organization=garethahealy

- name: Upload github-output.csv
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
with:
name: github-output.csv
path: github-output.csv
if-no-files-found: error
if-no-files-found: error
4 changes: 3 additions & 1 deletion src/main/docker/version.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{"version":"v1.0.0"}
{
"version": "v1.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
@CommandLine.Command(
name = "github-stats",
description = "GitHub helper utility",
subcommands = { CommandLine.HelpCommand.class })
subcommands = {CommandLine.HelpCommand.class})
public class QuarkusCommand {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import jakarta.inject.Inject;
import org.jboss.logging.Logger;
import org.kohsuke.github.GHOrganization;
import org.kohsuke.github.GitHub;
import org.kohsuke.github.GitHubBuilder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ public void run(String organization, String orgRepoName, boolean isDryRun) throw

private Set<String> getUsernamesToIgnore() throws IOException {
Set<String> answer = new HashSet<>();
CSVFormat csvFormat = CSVFormat.Builder.create(CSVFormat.DEFAULT).setSkipHeaderRecord(true).build();
try (Reader in = new FileReader("GitHub Red Hat CoP Members (Responses) - Form Responses 1.csv")) {
Iterable<CSVRecord> records = CSVFormat.DEFAULT.withFirstRecordAsHeader().parse(in);
Iterable<CSVRecord> records = csvFormat.parse(in);
for (CSVRecord record : records) {
answer.add(record.get("What is your GitHub username?"));
}
Expand All @@ -113,8 +114,9 @@ private Set<String> getUsernamesToIgnore() throws IOException {

private List<String> getCollectedEmails() throws IOException {
List<String> answer = new ArrayList<>();
CSVFormat csvFormat = CSVFormat.Builder.create(CSVFormat.DEFAULT).setSkipHeaderRecord(true).build();
try (Reader in = new FileReader("GitHub Red Hat CoP Members (Responses) - Form Responses 1.csv")) {
Iterable<CSVRecord> records = CSVFormat.DEFAULT.withFirstRecordAsHeader().parse(in);
Iterable<CSVRecord> records = csvFormat.parse(in);
for (CSVRecord record : records) {
answer.add(record.get("Email Address"));
}
Expand Down

0 comments on commit bd30bdf

Please sign in to comment.