Skip to content
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

Add basic support for issue-config file defaults #124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kkaarreell
Copy link
Collaborator

No description provided.

@kkaarreell
Copy link
Collaborator Author

kkaarreell commented Nov 14, 2024

Since i am reusing IssueAction class also for newly introduced defaults I had to make all class attributes optional.

# Iterate over issue actions. Take one, if it's not possible to finish it,
# put it back at the end of the queue.
while issue_actions:
action = issue_actions.pop(0)

ctx.logger.info(f"Processing {action.id}")

# update action object with default attributes when not present
action = _update_action_with_defaults(action, config.defaults)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is handling of defaults done here in the loop and not during config = IssueConfig.from_yaml_with_include call?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I guess I see that function for loading YAML, not doing semantic evaluation. Are you strongly against keeping it here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants