-
Notifications
You must be signed in to change notification settings - Fork 4
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
Is it possible to store the output of the policy for later step in the workflow? #297
Comments
I am glad to hear that you found this GHA helpful. This is not possible so far, but it should be possible to add/implement it. I would like to know more details about what output you would like to see. Also, some examples would be great. Internally: The policy will define the labels that will be set at the end. There is also a plan to add support for discussion forms, but I haven't yet time to implement it: |
So my use case is that I'm taking an issue form field input: - type: dropdown
id: team
attributes:
label: What does the security concern impact?
description: What is at risk due to the concern?
options:
- Acme the company Acme company/employee data or Acme infrastructure
- Acme products services or Acme customers
- Unknown
validations:
required: false I'm then using this action 💖 to convert that into more useful data: - template: ['security-report.yml']
section:
- id: ['team']
block-list: []
label:
- name: 'THOR IR'
keys: ['Acme the company Acme company/employee data or Acme infrastructure']
- name: 'PSIRT'
keys: ['Acme products services or Acme customers']
- name: 'PSIRT'
keys: ['Unknown'] And setting a label on the issue 🎉 However, I also need to set a field called This doesn't get me the data friendly output from the policy though! 😅
Yes! If I were able to access a list of labels, or a specific label by a key that would be wonderful. For example with the above policy and this action step: - name: Set labels for security reports
id: set-labels
uses: redhat-plumbers-in-action/advanced-issue-labeler@v2
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
template: 'security-report.yml'
token: ${{ secrets.GITHUB_TOKEN }} I'd love to be able to access a specific label with the policy id as the key Or a list of labels with |
Thank you for sharing the details. This sounds very reasonable. I can provide JSON output where key will be an id from issue form and value will be the label name. Implementation could take me some time because I have some important work to do this week. 🙂 I'll try to prioritize this feature since it might be also useful for others. Thank you for reaching out. 🙂 |
@ACyphus, I have tried to come up with a solution to your request. I have started with writing documentation in 2c9b726 I'm planning to have JSON output in the following format: {
"template": "bug.yml",
"section": {
"severity": [ "low" ],
"priority": [ "high" ]
}
} Would such an output be sufficient for your use case? Thank you. |
@jamacku I took a look at the pull request and this seems to exactly match my needs 💖 Thank you for working on this 🙌 |
@jamacku just wanted to follow up and say that this feature is working brilliantly! Thank you for implementing it 💖 |
@jamacku 👋 Thanks for working on this action—it's been incredibly helpful!
I'm curious if it's possible to access the result of the policy in a later workflow step? As well as applying a label, I'm trying to add a step to my workflow that also updates a GitHub project field, but I can't seem to access the results of the policy.
Any suggestions? Or is this not possible?
The text was updated successfully, but these errors were encountered: