Skip to content

feat: add option to require input of PAT

Erick Bajao requested to merge eb-pat-input into master

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:

Screen_Shot_2020-04-08_at_9.28.10_PM

Here, I have the updated backend code running locally. It uses the current_user's username and email based on the given PAT:

Screen_Shot_2020-04-08_at_9.28.37_PM

Merge request reports