Praqma / Praqmatic-Automated-Changelog

A repository for PAC (Praqmatic Automated Changelog)
MIT License
20 stars 6 forks source link

Reverse structural logic - choose "task plugin" per "request" #71

Open JKrag opened 7 years ago

JKrag commented 7 years ago

Very fast brainstorm sketch of idea:

Instead of:

:name: jira
      - { pattern: '/(PRJ-\d+)/i', label: jira }      
    :steps:
      - 
        :query: "http://your.server.hostname/rest/api/latest/issue/#{task_id}"
        :usr: "user"  
        :pw: "password"
        :namespace: 
      - 
        :query: http://<JIRA SERVER>:8080/rest/dev-status/latest/issue/detail?issueId=#{properties.data.issue.id}&applicationType=stash&dataType=repository
        :usr: "user"  
        :pw: "password"
        :namespace: issuedetails
      - 
        :query: http://<REQUIREMENTSSERVER>:4242/rest/fisk?reqId=#{properties.issuedetails.RID}
        :usr: "otheruser"  
        :pw: "otherpassword"
        :namespace: req_details

We would probably want something like:

    :scm
      - { pattern: '/(PRJ-\d+)/i', label: jira }      
    :steps:
      - 
        :plugin: json-rest
        :query: "http://your.server.hostname/rest/api/latest/issue/#{task_id}"
        :usr: "user"  
        :pw: "password"
        :namespace: 
      - 
        :plugin: xml-rest
        :query: http://<XML_BUG_SERVER>:8080/blabla?issueId=#{properties.data.issue.id}&applicationType=stash&dataType=repository
        :usr: "user"  
        :pw: "password"
        :namespace: issuedetails
      - 
        :plugin: local-executable
        :query: myscript.sh {properties.issuedetails.RID}
        :namespace: req_details
JKrag commented 7 years ago

Before we do this we will implement #69 first.