Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds methods to GHRepository to get the top ten referral paths and referrers via the API #1770

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ihrigb
Copy link
Contributor

@ihrigb ihrigb commented Dec 14, 2023

Description

Adds methods to GHRepository to get the top ten referral paths and referrers via the API.

References:

Before submitting a PR:

  • Changes must not break binary backwards compatibility. If you are unclear on how to make the change you think is needed while maintaining backward compatibility, CONTRIBUTING.md for details.
  • Add JavaDocs and other comments explaining the behavior.
  • When adding or updating methods that fetch entities, add @link JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .
  • Add tests that cover any added or changed code. This generally requires capturing snapshot test data. See CONTRIBUTING.md for details.
  • Run mvn -D enable-ci clean install site locally. If this command doesn't succeed, your change will not pass CI.
  • Push your changes to a branch other than main. You will create your PR from that branch.

When creating a PR:

  • Fill in the "Description" above with clear summary of the changes. This includes:
    • If this PR fixes one or more issues, include "Fixes #" lines for each issue.
    • Provide links to relevant documentation on https://docs.github.com/en/rest where possible. If not including links, explain why not.
  • All lines of new code should be covered by tests as reported by code coverage. Any lines that are not covered must have PR comments explaining why they cannot be covered. For example, "Reaching this particular exception is hard and is not a particular common scenario."
  • Enable "Allow edits from maintainers".

@ihrigb ihrigb changed the title Dev referrer Adds methods to GHRepository to get the top ten referral paths and referrers via the API Dec 14, 2023
@ihrigb
Copy link
Contributor Author

ihrigb commented Dec 14, 2023

Maybe someone could help with tests here. I get No response could be served as there are no stub mappings in this WireMock instance..

Plus running mvn -D enable-ci clean install site does fail for me, even on the current main branch without my changes.

@bitwiseman
Copy link
Member

What failure are you getting on main?

@ihrigb
Copy link
Contributor Author

ihrigb commented Jan 8, 2024

[INFO] Results:
[INFO]
[ERROR] Errors: 
[ERROR]   AppTest.notifications:1706 » GHIO Failed to set the custom verb
[ERROR]   AppTest.testCreateCommitComment:914 » GHIO Failed to set the custom verb
[ERROR]   AppTest.testCreateIssue:274 » GHIO Failed to set the custom verb
[ERROR]   AppTest.testPullRequestSearch:1451 » GHIO Failed to set the custom verb
[ERROR]   AppTest.testRepoCRUD:59 » GHIO Failed to set the custom verb
[ERROR]   AppTest.testRepoLabel:1582 » GHIO Failed to set the custom verb
[ERROR]   GHCheckRunBuilderTest.createCheckRunManyAnnotations:104 » GHIO Failed to set the custom verb
[ERROR]   GHCheckRunBuilderTest.updateCheckRun:192 » GHIO Failed to set the custom verb
[ERROR]   GHDiscussionTest.testGetAndEditDiscussion:119 » GHIO Failed to set the custom verb
[ERROR]   GHGistTest.lifecycleTest:54 » GHIO Failed to set the custom verb
[ERROR]   GHGistUpdaterTest.testGitUpdater:70 » GHIO Failed to set the custom verb
[ERROR]   GHIssueEventTest.testEventsForIssueRename:97 » GHIO Failed to set the custom verb
[ERROR]   GHIssueEventTest.testEventsForSingleIssue:33 » GHIO Failed to set the custom verb
[ERROR]   GHIssueEventTest.testIssueReviewRequestedEvent:80 » GHIO Failed to set the custom verb
[ERROR]   GHIssueTest.closeIssue:160 » GHIO Failed to set the custom verb
[ERROR]   GHIssueTest.removeLabels:260 » GHIO Failed to set the custom verb
[ERROR]   GHIssueTest.setAssignee:298 » GHIO Failed to set the custom verb
[ERROR]   GHIssueTest.setLabels:175 » GHIO Failed to set the custom verb
[ERROR]   GHMilestoneTest.testUnsetMilestone:91 » GHIO Failed to set the custom verb
[ERROR]   GHMilestoneTest.testUnsetMilestoneFromPullRequest:115 » GHIO Failed to set the custom verb
[ERROR]   GHMilestoneTest.testUpdateMilestone:59 » GHIO Failed to set the custom verb
[ERROR]   GHOrganizationTest.testEnableOrganizationProjects:495 » GHIO Failed to set the custom verb
[ERROR]   GHProjectCardTest.testArchiveCard:69 » GHIO Failed to set the custom verb
[ERROR]   GHProjectCardTest.testEditCardNote:55 » GHIO Failed to set the custom verb
[ERROR]   GHProjectColumnTest.testEditColumnName:51 » GHIO Failed to set the custom verb
[ERROR]   GHProjectTest.testEditProjectBody:71 » GHIO Failed to set the custom verb
[ERROR]   GHProjectTest.testEditProjectName:56 » GHIO Failed to set the custom verb
[ERROR]   GHProjectTest.testEditProjectState:86 » GHIO Failed to set the custom verb
[ERROR]   GHReleaseTest.testMakeLatestRelease:191 » GHIO Failed to set the custom verb
[ERROR]   GHReleaseTest.testUpdateRelease:130 » GHIO Failed to set the custom verb
[ERROR]   GHRepositoryTest.archive:124 » GHIO Failed to set the custom verb
[ERROR]   GHRepositoryTest.setDeleteBranchOnMerge:995 » GHIO Failed to set the custom verb
[ERROR]   GHRepositoryTest.setMergeOptions:951 » GHIO Failed to set the custom verb
[ERROR]   GHRepositoryTest.testGetRepositoryWithVisibility:432 » GHIO Failed to set the custom verb
[ERROR]   GHRepositoryTest.testSearchPullRequests:1745 » GHIO Failed to set the custom verb
[ERROR]   GHRepositoryTest.testSetPublic:303 » GHIO Failed to set the custom verb
[ERROR]   GHRepositoryTest.testUpdateRepoActionVariable:1676 » GHIO Failed to set the custom verb
[ERROR]   GHRepositoryTest.testUpdateRepository:390 » GHIO Failed to set the custom verb
[ERROR]   GHTeamTest.testSetDescription:39 » GHIO Failed to set the custom verb
[ERROR]   GHTeamTest.testSetPrivacy:147 » GHIO Failed to set the custom verb
[ERROR]   GHTreeBuilderTest.testAdd:125->updateTree:187 » GHIO Failed to set the custom verb
[ERROR]   GHTreeBuilderTest.testDelete:149->updateTree:187 » GHIO Failed to set the custom verb
[ERROR]   GHTreeBuilderTest.testShaEntry:106->updateTree:187 » GHIO Failed to set the custom verb
[INFO]
[ERROR] Tests run: 458, Failures: 0, Errors: 43, Skipped: 25
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:56 min
[INFO] Finished at: 2024-01-08T12:40:18+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.3:test (default-test) on project github-api:
[ERROR]
[ERROR] Please refer to C:\SAPDevelop\opensource\github-api\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@ihrigb
Copy link
Contributor Author

ihrigb commented Feb 6, 2024

@bitwiseman ?

@ihrigb
Copy link
Contributor Author

ihrigb commented Mar 4, 2024

@bitwiseman ping again

@bitwiseman
Copy link
Member

@ihrigb
To make the tests run locally, run this:

mvn -B clean install -D enable-ci "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED"

I understand this differs from what is in CONTRIBUTING.md. I'm working on updating the build and the instructions to remove the need for that extra argument.

@ihrigb
Copy link
Contributor Author

ihrigb commented Mar 8, 2024

In that case, the build is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants