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: Add new CustomCIWithGithub CI Source Type #1435

Merged
merged 1 commit into from Apr 21, 2023

Conversation

jmeridth
Copy link
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
Copy link
Contributor Author

jmeridth commented Apr 11, 2023

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
Copy link
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
Copy link
Member

orta commented Apr 12, 2023

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
Copy link
Contributor Author

jmeridth commented Apr 12, 2023

@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
Contributor Author

@orta bump

@orta
Copy link
Member

orta commented Apr 18, 2023

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
Copy link
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
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
Contributor Author

@orta bump. Thank you for reviewing.

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>
Copy link
Member

@orta orta left a comment

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
12 checks passed
@jmeridth jmeridth deleted the jm/generalized-github-ci branch April 21, 2023 15:46
@orta
Copy link
Member

orta commented Apr 21, 2023

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.

None yet

2 participants