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

Add support for checking pull request labels #15

Merged
merged 2 commits into from
May 28, 2023
Merged

Conversation

jonathanio
Copy link
Contributor

@jonathanio jonathanio commented May 28, 2023

Add support for checking pull request labels using pull-checker as part of #1.

Checklist

Please confirm the following checks:

  • My pull request follows the guidelines set out in CONTRIBUTING.md.
  • I have performed a self-review of my code and run any tests locally to check.
  • I have added tests that prove my changes are effective and work correctly.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my code and corrected any misspellings.
  • Each commit in this pull request has a meaningful subject & body for context.
  • I have squashed all "fix(up)" commits to provide a clean code history.
  • My pull request has an appropriate title and description for context.
  • I have linked this pull request to other issues or pull requests as needed.
  • I have added type/..., changes/..., and 'release/...' labels as needed.

@jonathanio jonathanio added priority/high This is a high-priority issue or pull reqest release/update An update to an existing feature is made with this pull request type/enhancement Adding or requesting a new feature update/documentation Update with improvements to the documentation update/github-action Update with changes to the GitHub Action update/go Update with changes to Go files or applications work-in-progress This pull request is currently work-in-progress labels May 28, 2023
@jonathanio jonathanio self-assigned this May 28, 2023
@jonathanio jonathanio linked an issue May 28, 2023 that may be closed by this pull request
4 tasks
@jonathanio jonathanio closed this May 28, 2023
@jonathanio jonathanio reopened this May 28, 2023
Add the initial code to check the labels attached to a pull request,
which currently requires that all the prefixes provided can be found to
pass the check.
Add support for a flag to change the label prefix match from the add
case (all must match) to any (any one prefix can match any one label).
@codecov
Copy link

codecov bot commented May 28, 2023

Codecov Report

Patch coverage: 64.51% and project coverage change: +22.49 🎉

Comparison is base (faa1b6c) 16.66% compared to head (40f2698) 39.16%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #15       +/-   ##
===========================================
+ Coverage   16.66%   39.16%   +22.49%     
===========================================
  Files           3        4        +1     
  Lines         102      143       +41     
===========================================
+ Hits           17       56       +39     
- Misses         85       87        +2     
Flag Coverage Δ
unit-tests 39.16% <64.51%> (+22.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/action/main.go 0.00% <0.00%> (ø)
internal/github/main.go 0.00% <0.00%> (ø)
internal/action/check_labels.go 100.00% <100.00%> (ø)
internal/action/check_title.go 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.

@jonathanio jonathanio marked this pull request as ready for review May 28, 2023 21:51
@jonathanio jonathanio requested a review from a team as a code owner May 28, 2023 21:51
@jonathanio jonathanio merged commit f3fcab8 into main May 28, 2023
@jonathanio jonathanio deleted the add-labels-check branch May 28, 2023 21:53
@jonathanio jonathanio linked an issue Jun 1, 2023 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/high This is a high-priority issue or pull reqest release/update An update to an existing feature is made with this pull request type/enhancement Adding or requesting a new feature update/documentation Update with improvements to the documentation update/github-action Update with changes to the GitHub Action update/go Update with changes to Go files or applications work-in-progress This pull request is currently work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create standard GitHub Action for checking and automating pull request checks
1 participant