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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to change Meta information #559

Open
Nikoloutsos opened this issue Jan 8, 2023 · 4 comments
Open

Ability to change Meta information #559

Nikoloutsos opened this issue Jan 8, 2023 · 4 comments

Comments

@Nikoloutsos
Copy link
Contributor

Nikoloutsos commented Jan 8, 2023

Hi 馃憢 ,
there is a need from my side to change the meta information showing in the text info.

Currently we have this:

public struct Meta: Encodable {
    let runtimeName = "Danger Swift"
    let runtimeHref = "https://danger.systems/swift"
}

There is no way you can change this value, so I was guessing if you are okay with me making a PR about it and giving this ability.

I am thinking that users can use a custom flag --metaRuntimeName and --metaruntimeHref to alter it.
Or just add a new method in DangerDSL that will be.

/// Change the metadata showing in the bottom of the PR
func meta(meta: Meta) {
    globalResults.meta = meta
}

But I'd like to hear your opinion before starting working on this

@Nikoloutsos
Copy link
Contributor Author

A follow-up comment. I guess another option is to fork this repo and change it.

@orta
Copy link
Member

orta commented Jan 22, 2023

I'm more interested in what you'd want to change it to? I've had a request to remove it in Danger JS but to change it to something else is pretty new

@Nikoloutsos
Copy link
Contributor Author

Nikoloutsos commented Jan 22, 2023

A short into:
@orta
I've been building an open-source library and using it in my company atm named Walle which is powered by danger. Walle can be setup by just creating a .walle.yml in your repo. This config describes what ready-to-use steps to run in your repo. Example

- name: "WorkInProgressStep"
- name: "CommitsLintStep"
  inputs:
    regex: "^(Merge|Add|Drop|Fix|Bump|Make|Start|Stop|Optimize|Document|Refactor|Reformat|Rearrange|Redraw|Reword|Scaffold) .+$"
    max_characters: 50
- name: "XCResultSummaryStep"
- name: "SwiftlintStep"
- name: "JSONYAMLValidationStep"

JSONYAMLValidationStep verifies all JSON/YML added/edited are valid.
CommitsLintStep verifies commits are following a pattern.
XCResultSummaryStep Reports .xcresult (warnings, error, failled tests etc).

The idea is to keep the configuration stupid simple and provide ready to use steps.

Why I want this feature?
When Walle is reporting, I want the meta information to be like

Generated by 鉂わ笍 馃 Walle against ed31s

And here is a sneak peak of what Walle reporting looks like:
image

@f-meloni
Copy link
Member

Cool! Yes sure makes sense to me :)

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

No branches or pull requests

3 participants