Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

[feature] Rotator can write GitHub Actions secrets #44

Merged
merged 3 commits into from
Mar 4, 2020

Conversation

edulop91
Copy link
Contributor

@edulop91 edulop91 commented Mar 4, 2020

Add a new rotator sink to write github action secrets

Test Plan

Ran local test. TODO: unit tests

References

https://developer.github.com/v3/actions/secrets/

@edulop91 edulop91 requested a review from a team as a code owner March 4, 2020 17:08
@mahmoudian1
Copy link

Codecov Report

Merging #44 into master will decrease coverage by 3.40%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
- Coverage   27.51%   24.10%   -3.41%     
==========================================
  Files          13       15       +2     
  Lines         418      477      +59     
==========================================
  Hits          115      115              
- Misses        292      351      +59     
  Partials       11       11              
Impacted Files Coverage Δ
pkg/sink/github_actions_env.go 0.00% <0.00%> (ø)
pkg/sink/helpers.go 66.66% <0.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 3c6e610...08f5ecd. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Mar 4, 2020

Codecov Report

Merging #44 into master will decrease coverage by 3.4%.
The diff coverage is 12.67%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #44      +/-   ##
=========================================
- Coverage   27.51%   24.1%   -3.41%     
=========================================
  Files          13      15       +2     
  Lines         418     477      +59     
=========================================
  Hits          115     115              
- Misses        292     351      +59     
  Partials       11      11
Impacted Files Coverage Δ
pkg/sink/sink.go 0% <ø> (ø) ⬆️
pkg/config/config.go 2.55% <0%> (-0.14%) ⬇️
pkg/sink/github_actions_env.go 0% <0%> (ø)
pkg/sink/circleCi.go 83.33% <100%> (ø) ⬆️
pkg/sink/travisCi.go 54.05% <100%> (-2.47%) ⬇️
pkg/sink/helpers.go 66.66% <66.66%> (ø)

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 3c6e610...d8820d0. Read the comment docs.

Copy link
Contributor

@jgadling jgadling left a comment

Choose a reason for hiding this comment

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

Approved once tests are added

@czimergebot czimergebot merged commit b6121fc into master Mar 4, 2020
@czimergebot czimergebot deleted the edu/github-actions branch March 4, 2020 17:37
KindBuf Kind = "Buffer"
KindTravisCi Kind = "TravisCI"
KindCircleCi Kind = "CircleCI"
KindGithubActionsSecret Kind = "GitHubActionsSecret"
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing marshalling in the MarshalYAML below

s.repo,
encryptedSecret,
)
return errors.Wrap(err, "could not write encrypted secret to GitHub")
Copy link
Contributor

Choose a reason for hiding this comment

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

Always returns an error, even on success.

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

Successfully merging this pull request may close these issues.

6 participants