Skip to content

CRUD repository variable#1668

Closed
garridobarrera wants to merge 0 commit intohub4j:mainfrom
garridobarrera:main
Closed

CRUD repository variable#1668
garridobarrera wants to merge 0 commit intohub4j:mainfrom
garridobarrera:main

Conversation

@garridobarrera
Copy link
Copy Markdown
Contributor

@garridobarrera garridobarrera commented Jun 1, 2023

Description

Methods to create and update repository variables:

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 as appropriate. Consider including links in comments to 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.
  • 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".

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2023

Codecov Report

Patch coverage: 87.87% and project coverage change: +0.05 🎉

Comparison is base (7403e25) 79.93% compared to head (6f614ca) 79.98%.

❗ Current head 6f614ca differs from pull request most recent head 47245f6. Consider uploading reports for the commit 47245f6 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1668      +/-   ##
============================================
+ Coverage     79.93%   79.98%   +0.05%     
- Complexity     2208     2221      +13     
============================================
  Files           212      213       +1     
  Lines          6687     6719      +32     
  Branches        364      365       +1     
============================================
+ Hits           5345     5374      +29     
- Misses         1128     1131       +3     
  Partials        214      214              
Impacted Files Coverage Δ
.../java/org/kohsuke/github/GHRepositoryVariable.java 84.00% <82.60%> (+17.33%) ⬆️
src/main/java/org/kohsuke/github/GHRepository.java 71.85% <100.00%> (+0.12%) ⬆️
...rg/kohsuke/github/GHRepositoryVariableBuilder.java 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@garridobarrera garridobarrera marked this pull request as ready for review June 1, 2023 17:09
Comment thread src/main/java/org/kohsuke/github/GHRepository.java Outdated
Comment thread src/main/java/org/kohsuke/github/GHRepository.java Outdated
Comment thread src/main/java/org/kohsuke/github/GHRepository.java Outdated
Comment thread src/test/java/org/kohsuke/github/GHRepositoryTest.java Outdated
Copy link
Copy Markdown
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

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

I'm sorry about this review. You've done solid work here, including providing tests.

I didn't properly think through the PR the introduced GHRepositoryVariables. My bad. But now that I see there's more to them, I'd like to do this API better. Are you up for it?

If you're strongly opposed, I'm open to alternatives.

@garridobarrera
Copy link
Copy Markdown
Contributor Author

I'm sorry about this review. You've done solid work here, including providing tests.

I didn't properly think through the PR the introduced GHRepositoryVariables. My bad. But now that I see there's more to them, I'd like to do this API better. Are you up for it?

If you're strongly opposed, I'm open to alternatives.

no worries @bitwiseman. I agree you !!

@garridobarrera garridobarrera requested a review from bitwiseman June 5, 2023 14:54
@garridobarrera garridobarrera changed the title Include createRepoVariable and updateRepoVariable methods CRUD repository variable Jun 5, 2023
@garridobarrera
Copy link
Copy Markdown
Contributor Author

@bitwiseman, I have applied the same pattern as GHLabel.

@garridobarrera garridobarrera force-pushed the main branch 2 times, most recently from 47245f6 to 4cbae90 Compare June 9, 2023 06:24
@garridobarrera garridobarrera mentioned this pull request Jun 9, 2023
10 tasks
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.

2 participants