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

Support getting repository from project card #1260

Merged
merged 6 commits into from
Oct 21, 2021

Conversation

JLLeitschuh
Copy link
Contributor

@JLLeitschuh JLLeitschuh commented Oct 3, 2021

Closes #1097

Before submitting a PR:

We love getting PRs, but we hate asking people for the same basic changes every time.

  • Push your changes to a branch other than main. Create your PR from that branch.
  • Add JavaDocs and other comments
  • Write tests that run and pass in CI. See CONTRIBUTING.md for details on how to capture snapshot data.
  • Run mvn -D enable-ci clean install site locally. If this command doesn't succeed, your change will not pass CI.

When creating a PR:

  • Fill in the "Description" above.
  • Enable "Allow edits from maintainers".

@JLLeitschuh JLLeitschuh marked this pull request as draft October 3, 2021 12:39
@JLLeitschuh
Copy link
Contributor Author

Blocked by #1261

@@ -55,6 +55,8 @@ public void testCreateCardFromIssue() throws IOException {
GHIssue issue = repo.createIssue("new-issue").body("With body").create();
GHProjectCard card = column.createCard(issue);
assertThat(card.getContentUrl(), equalTo(issue.getUrl()));
assertThat(card.getContent(), notNullValue());
assertThat(card.getContent().getRepository(), notNullValue());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to assert some meaningful information, such as Id and/or description. Just notNullValue() is not a sufficient test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, this was just to get the right API calls being made.

@JLLeitschuh JLLeitschuh force-pushed the fix/JLL/project_card_repository branch from 19e9a95 to 1cdbc17 Compare October 11, 2021 15:59
@JLLeitschuh JLLeitschuh marked this pull request as ready for review October 11, 2021 16:02
@codecov
Copy link

codecov bot commented Oct 11, 2021

Codecov Report

Merging #1260 (c25068e) into main (0b8c6e3) will increase coverage by 0.02%.
The diff coverage is 77.77%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1260      +/-   ##
============================================
+ Coverage     77.47%   77.50%   +0.02%     
- Complexity     1901     1905       +4     
============================================
  Files           189      189              
  Lines          5985     6000      +15     
  Branches        327      328       +1     
============================================
+ Hits           4637     4650      +13     
  Misses         1150     1150              
- Partials        198      200       +2     
Impacted Files Coverage Δ
...rc/main/java/org/kohsuke/github/GHProjectCard.java 41.86% <ø> (+2.32%) ⬆️
src/main/java/org/kohsuke/github/GHIssue.java 72.84% <75.00%> (-0.15%) ⬇️
.../main/java/org/kohsuke/github/GHProjectColumn.java 66.66% <100.00%> (+3.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b8c6e3...c25068e. Read the comment docs.

@JLLeitschuh JLLeitschuh force-pushed the fix/JLL/project_card_repository branch from 8ad4369 to 0c71293 Compare October 13, 2021 20:31
@bitwiseman bitwiseman merged commit 42469ba into hub4j:main Oct 21, 2021
@JLLeitschuh
Copy link
Contributor Author

Hey @bitwiseman,
Thanks for merging! 😄

I'm currently participating in Hacktoberfest. If you think this PR was useful, would you be so kind as to add the hacktoberfest-accepted label for this PR so it can count towards my 4 PRs?

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

Successfully merging this pull request may close these issues.

ghProjectCard.content.repository is null
2 participants