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 the workflow_run event #147

Merged
merged 4 commits into from
Apr 17, 2021
Merged

Conversation

chinthakagodawita
Copy link
Owner

@chinthakagodawita chinthakagodawita commented Apr 17, 2021

#138 with:

  • Support for pull_request events
  • Better event data typings
  • README updates

Closes #138

electrofelix and others added 3 commits April 17, 2021 15:22
Updates to enhance security around github token handling means that PRs
merged to a target branch by github native dependabot no longer receive
a write access token by default. Instead it is required to have a push
workflow trigger a workflow_run subsequently that is provided with write
access.

To support this add a route and handler function for workflow_run events
that reuses much of the functionality from the push handler by moving
the common capabilities to a shared function.

Includes a check to skip such a workflow if it is triggered via
pull_request events instead until such time as someone can add the
required support using the existing pull_request handler for the common
pieces.

Adds tests following the same pattern for the handlePull function.
Also adds typings for incoming event data and auto mocks in tests based
off the event typing.
@codecov
Copy link

codecov bot commented Apr 17, 2021

Codecov Report

Merging #147 (2a7b4fc) into master (e05b62f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #147   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          439       475   +36     
  Branches        87        96    +9     
=========================================
+ Hits           439       475   +36     
Impacted Files Coverage Δ
src/autoupdater.ts 100.00% <100.00%> (ø)
src/router.ts 100.00% <100.00%> (ø)

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 e05b62f...2a7b4fc. Read the comment docs.

@chinthakagodawita chinthakagodawita marked this pull request as ready for review April 17, 2021 06:47
@chinthakagodawita
Copy link
Owner Author

Manual test passing.

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