danger / swift

⚠️ Stop saying "you forgot to …" in code review

Home Page:https://danger.systems/swift/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to change Meta information

Nikoloutsos opened this issue · comments

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

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

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

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

Cool! Yes sure makes sense to me :)