Skip to content

Configuration Handling #123

@francoto

Description

@francoto

current mistakes :

  • config duplicated in the output folder should contains all fields (not only the one required but also the default values used)
  • unsubscribe is still not handled properly
  • validate that config file is defining all necessary keys

Unsubscribe handling

the comment detection is only performed in the "publish" stage, not in run-analysis.
So it requires trying to publish to actually updates the config.
=> Is it a main drawback ?
As we want to run analysis in any case it is ok to not consider this in the run-analysis stage.

reproduce usage

uv run sw-metadata-bot run-analysis --config-file assets/config_unsubscribe.json
# create the analysis
uv run sw-metadata-bot publish --analysis-root outputs/unsubscribe/20260520/
# publish the issue

then add "unsubscribe" comment

# rerun analysis
uv run sw-metadata-bot run-analysis --config-file assets/config_unsubscribe.json
# try publish the issue with new output
uv run sw-metadata-bot publish --analysis-root outputs/unsubscribe/20260520_2/

expected output

outputs/unsubscribe/20260520_2/config.json should have added the repo url in the issues.opt-outs list.
assets/config_unsubscribe.json should have added the repo url in the issues.opt-outs list.

Validate

when reading the config file

  • it should return errors if necessary fields are not valid
  • it should add warning about fields not handled correctly but not used (skipped)

Explicit config

the explicit config is giving the default parameters used if these parameters have not been defined by the configuration file and were not required (ex: "custom_message")

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions