Skip to content

feat: Add new CustomCIWithGithub CI Source Type#1435

Merged
orta merged 1 commit into
danger:masterfrom
jmeridth:jm/generalized-github-ci
Apr 21, 2023
Merged

feat: Add new CustomCIWithGithub CI Source Type#1435
orta merged 1 commit into
danger:masterfrom
jmeridth:jm/generalized-github-ci

Conversation

@jmeridth

Copy link
Copy Markdown
Contributor

Add CI Source that doesn't match any third party vendors (like an internal CI system) but it uses GitHub for source control.

@jmeridth

jmeridth commented Apr 11, 2023

Copy link
Copy Markdown
Contributor Author

This is a good v0.1 approach. May want to make this its own abstraction for each souce control type (GitHub, Bitbucket, Gitlab, etc). Danger::CI::CustomCI::GitHub or (Danger::CI::Github::Custom and Danger::CI::Github::GithubActions) or something like that

@jmeridth jmeridth force-pushed the jm/generalized-github-ci branch from 77f6245 to 3c5b525 Compare April 11, 2023 04:54
@jmeridth

Copy link
Copy Markdown
Contributor Author

@orta if you have any suggestions on this one or if I'm completely off-base please let me know. Thank you for your time on this codebase.

@orta

orta commented Apr 12, 2023

Copy link
Copy Markdown
Member

What is your actual goal with this? We already have some env vars for running a FakeCI in Danger I believe, and this code is effectively duplicating that

@jmeridth jmeridth force-pushed the jm/generalized-github-ci branch from 3c5b525 to 228b288 Compare April 12, 2023 12:46
@jmeridth

jmeridth commented Apr 12, 2023

Copy link
Copy Markdown
Contributor Author

@orta I'm trying to utilize danger against an internal CI system that uses GitHub. Is this a possible use case?

The only thing I could find that relates to a FakeCI like you mention is a FakeCISource here that is used in testing to test local setup. If this is not what you meant, could you please link me to what you were thinking?

To be clear I'm not trying to mock the CI. I would still like danger to run against the PRs. Setting DANGER_USE_LOCAL_GIT to use LocalGitRepo does not work because that just causes Not a LocalGitRepo Pull Request - skipping "danger" run. to happen because validates_as_pr is false

There is a good chance I'm misusing danger and there is a better way to do this. Thank you for any assistance you can provide. Wanted to provide the PR in case there was not a current way. Cheers.

@jmeridth

Copy link
Copy Markdown
Contributor Author

@orta bump

@orta

orta commented Apr 18, 2023

Copy link
Copy Markdown
Member

OK, yeah, I think this is reasonable - if you add the inline docs to the class (as it will show up on the site) I'm fine with merging it

@jmeridth jmeridth force-pushed the jm/generalized-github-ci branch from 228b288 to 1d6a7fe Compare April 18, 2023 20:09
@jmeridth

Copy link
Copy Markdown
Contributor Author

Ran tests locally

Finished in 59.1 seconds (files took 1.14 seconds to load)
1240 examples, 0 failures, 2 pending

@jmeridth

Copy link
Copy Markdown
Contributor Author

@orta added the inline docs and fixed merge conflict with CONTRIBUTING.md. Fixed typo in a spec and now they are passing locally.

@jmeridth jmeridth changed the title feat: Add new CustomCiWithGithub CI Source Type feat: Add new CustomCIWithGithub CI Source Type Apr 20, 2023
@jmeridth

Copy link
Copy Markdown
Contributor Author

@orta bump. Thank you for reviewing.

Comment thread lib/danger/ci_source/custom_ci_with_github.rb Outdated
Add CI Source that doesn't match any third party vendors (like an internal CI system) but it
uses GitHub for source control.

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth force-pushed the jm/generalized-github-ci branch from 95ba130 to caa4bdb Compare April 21, 2023 15:17
@jmeridth jmeridth requested a review from orta April 21, 2023 15:18

@orta orta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, describes it perfectly πŸ‘πŸ»

@orta orta merged commit 093c31a into danger:master Apr 21, 2023
@jmeridth jmeridth deleted the jm/generalized-github-ci branch April 21, 2023 15:46
@orta

orta commented Apr 21, 2023

Copy link
Copy Markdown
Member

Shipped as 9.3.0

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