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

Automate check that every file is in qiskit_bot.yaml #1330

Closed
Eric-Arellano opened this issue May 8, 2024 · 0 comments · Fixed by #1375
Closed

Automate check that every file is in qiskit_bot.yaml #1330

Eric-Arellano opened this issue May 8, 2024 · 0 comments · Fixed by #1375
Assignees

Comments

@Eric-Arellano
Copy link
Collaborator

Eric-Arellano commented May 8, 2024

Abby C pointed out taht we risk qiskit_bot.yaml becoming stale, such as when we add new pages or rename pages. So, we should have a new check that ensures every non-API file has an owner in qiskit_bot.yaml.

Of course, some pages don't need owners, so there should be an allowlist mechanism. You have to explicitly opt-in to this allowlist. The default behavior is to error if the file has no owners.

The error message should explain well what the options are: adding an owner or allow-listing. It should account for the possibility the file has been renamed vs. new file.

Implementation will be similar to the orphan page check.

github-merge-queue bot pushed a commit that referenced this issue May 15, 2024
Closes #1330

This PR adds a check for the qiskit bot config to avoid the
`qiskit_bot.yaml` becoming stale.

The check shows two lists of files that can lead to an error:

The first one is for files that exist in the repo but don't have any
entry in the qiskit bot entry. This case will be triggered when we add
new files or we rename old ones without changing the configuration. If
we don't want to track a new file, we can add its path to the
`ALLOWED_OWNERLESS_FILES` set to avoid the error message.

The second list of files are the ones that don't exist in the repo but
have an entry in the config file. This case will be triggered by files
that change their name, removed files with the entry as a leftover, or
files where we set the config beforehand. The last ones can be added to
the `ALLOWED_INEXISTENT_FILES` set to avoid the error message.

The renamed files trigger both errors and will show the old name in the
first list, and the new name in the second one. This could be useful to
identify the old entries in the config file and to associate the files
in case we have multiple errors.

---------

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants