-
Notifications
You must be signed in to change notification settings - Fork 11
fix: make a json dict for the GitHub output #829
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
fix: make a json dict for the GitHub output #829
Conversation
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 👀 Review RequirementsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
|
🧪 CI InsightsHere's what we observed from your CI run for e97630a. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Consolidate GitHub Actions outputs into a single JSON-encoded value to simplify consumption in workflows.
- Aggregate scope results into one output key named "scopes" with a JSON dictionary.
- Update tests to assert the new JSON output format.
- Introduce a constant for the output name and import json.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| mergify_cli/ci/scopes/cli.py | Switch from per-scope lines to a single JSON payload under the "scopes" output; add constant and json import. |
| mergify_cli/tests/ci/scopes/test_cli.py | Adjust test to assert the new "scopes={...}" single-line JSON output. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
e7299fb to
660d012
Compare
660d012 to
956596d
Compare
5ce0e58 to
611ba3f
Compare
611ba3f to
66047c2
Compare
66047c2 to
79862f2
Compare
79862f2 to
5aece87
Compare
GitHub supports dynamic outputs only if the action use "using: node". This does not work for "using: composite" or "docker" action. The workaround is to dump the json into the output. Then the GitHub workflow will be able to use fromJSON to read it: ``` if: fromJSON(steps.action.outputs.scopes).everything ``` Change-Id: I294c5f828801ad06a6ed613a127ed1b9315e40aa
5aece87 to
18bdf66
Compare
Co-authored-by: Julien Danjou <[email protected]>
GitHub supports dynamic outputs only if the action use "using: node".
This does not work for "using: composite" or "docker" action.
https://github.com/orgs/community/discussions/10529
The workaround is to dump the json into the output.
Then the GitHub workflow will be able to use fromJSON to read it: