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

Optional fields #18

Closed
2 tasks done
gr2m opened this issue Mar 7, 2022 · 0 comments · Fixed by #52
Closed
2 tasks done

Optional fields #18

gr2m opened this issue Mar 7, 2022 · 0 comments · Fixed by #52
Assignees
Labels

Comments

@gr2m
Copy link
Owner

gr2m commented Mar 7, 2022

Please avoid duplicates

What’s missing?

The ability to define some fields as optional.

It could be implemented similarly to what is suggested in #8

{ myField: {name:"My Field", optional: true }

Why?

In a use case where the github-project is used with multiple projects, I would like to set some fields, but only if they are present in the project. If any of these "optional" fields are not present, no error should be thrown, instead an info message should be logged via octokit.log.info

Alternatives you tried

I can't think of a simple alternative way. The existing fields would need to be loaded without using github-project, so we know the existing fields at the time of initialization. And we would need to filter out non-present fields each time we set them.

Would you be interested in contributing the feature?

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

Successfully merging a pull request may close this issue.

2 participants