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

feat: Implement missing push rules #3294

Merged
merged 4 commits into from
Oct 1, 2024

Conversation

srgustafson8
Copy link
Contributor

Adds support for the missing Push Rules - Restrict file path length, Restrict file extensions and Restrict file size with tests.

Closes #3274

@srgustafson8
Copy link
Contributor Author

Tests output:

testing .
?       github.com/google/go-github/v65/test/integration        [no test files]
        github.com/google/go-github/v65/test/fields             coverage: 0.0% of statements
ok      github.com/google/go-github/v65/github  8.592s  coverage: 99.4% of statements
testing example
        github.com/google/go-github/v65/example/codespaces/newusersecretwithxcrypto             coverage: 0.0% of statements
        github.com/google/go-github/v65/example/appengine               coverage: 0.0% of statements
        github.com/google/go-github/v65/example/basicauth               coverage: 0.0% of statements
        github.com/google/go-github/v65/example/codespaces/newreposecretwithxcrypto             coverage: 0.0% of statements
        github.com/google/go-github/v65/example/actionpermissions               coverage: 0.0% of statements
        github.com/google/go-github/v65/example/migrations              coverage: 0.0% of statements
        github.com/google/go-github/v65/example/commitpr                coverage: 0.0% of statements
        github.com/google/go-github/v65/example/listenvironments                coverage: 0.0% of statements
        github.com/google/go-github/v65/example/newfilewithappauth              coverage: 0.0% of statements
        github.com/google/go-github/v65/example/newrepo         coverage: 0.0% of statements
        github.com/google/go-github/v65/example/ratelimit               coverage: 0.0% of statements
        github.com/google/go-github/v65/example/newreposecretwithxcrypto                coverage: 0.0% of statements
        github.com/google/go-github/v65/example/simple          coverage: 0.0% of statements
        github.com/google/go-github/v65/example/tagprotection           coverage: 0.0% of statements
        github.com/google/go-github/v65/example/tokenauth               coverage: 0.0% of statements
        github.com/google/go-github/v65/example/topics          coverage: 0.0% of statements
testing scrape
ok      github.com/google/go-github/scrape      (cached)        coverage: 59.4% of statements
        github.com/google/go-github/scrape/example/scrape               coverage: 0.0% of statements
testing tools
ok      tools/metadata  (cached)        coverage: 81.7% of statements```

@srgustafson8 srgustafson8 changed the title Implement required functions and unmarshal config for push rules feat: implement required functions and unmarshal config for push rules Sep 25, 2024
@srgustafson8 srgustafson8 changed the title feat: implement required functions and unmarshal config for push rules feat: implement missing push rules Sep 25, 2024
@gmlewis gmlewis changed the title feat: implement missing push rules feat: Implement missing push rules Sep 25, 2024
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @srgustafson8 !
Just a few minor tweaks, please, then we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.

If you have a moment, would you mind taking a look at some of the other outstanding PRs and give them code reviews, please? Of note is #3254 where the author is expressing desire to merge ASAP. Thank you!

github/repos_rules.go Outdated Show resolved Hide resolved
github/repos_rules.go Show resolved Hide resolved
github/repos_rules.go Outdated Show resolved Hide resolved
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Sep 25, 2024
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.01%. Comparing base (2b8c7fa) to head (14dddd8).
Report is 128 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3294      +/-   ##
==========================================
- Coverage   97.72%   93.01%   -4.72%     
==========================================
  Files         153      171      +18     
  Lines       13390    11777    -1613     
==========================================
- Hits        13085    10954    -2131     
- Misses        215      729     +514     
- Partials       90       94       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @srgustafson8 !
LGTM.

Awaiting second LGTM+Approval from any other contributor to this repo before merging.

Copy link
Contributor

@tomfeigin tomfeigin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@air-hand air-hand left a comment

Choose a reason for hiding this comment

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

LGTM

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Oct 1, 2024
@gmlewis
Copy link
Collaborator

gmlewis commented Oct 1, 2024

Thank you, @tomfeigin and @air-hand !
Merging.

@gmlewis gmlewis merged commit 0024ad2 into google:master Oct 1, 2024
6 of 7 checks passed
gmlewis pushed a commit that referenced this pull request Oct 1, 2024
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.

Feature: Add support for Repo/Org Push rulesets
4 participants