feat: add option to require input of PAT
What does this do?
Adds support for specifying data-require-auth
on the script tag.
When this attribute is set to something "truthy", the name and email fields won't
show up but instead the user will be asked to enter his/her
personal access token. For now, this is the only way the tool can work
on private/internal projects.
This change can be released even before the backend for it is implemented. As long as data-require-auth
is not used, it will still work as usual, asking for name and email.
Related issue: gitlab#42750 (comment 317271120)
Screenshots
Here are some screenshots on how it would look like eventually when the backend is done.
This is the updated form. It will not ask for name and email:
Here, I have the updated backend code running locally. It uses the current_user
's username and email based on the given PAT: