- Adds a default on expires_at datetime
- Modifies deploy tokens views to handle default expires at value
- Use datetime_with_timezone where possible
- Remove unused scopes
- Keep 'Deploy Section' open upon save, otherwise the token might get
lost
- When an error appears, display the error inside the form and also keep
the Deploy Section open
- Changue copy of revoke modal
Includes:
- Model, factories, create service and controller actions
- As usual, includes specs for everything
- Builds UI (copy from PAT)
- Add revoke action
Closes#31591
Makes it clear this is only used in dropdowns, instead of cluttering up Project class. Since we only care about branch names, it is also possible to refactor out a lot of the set/reject logic.
A benchmark on Array/Set subtraction favoured using Arrays. This was with 5000 ‘branches’ and 2000 ‘protections’ to ensure a similar comparison to the commit which introduced using Set for intersection.
Comparison:
array subtraction: 485.8 i/s
set subtraction: 128.7 i/s - 3.78x slower
Added specs for the deploy_keys_presenter and added a new method in the presenter
called #key_available?
Fixed some minor UX inconsistencies and added a concern to handle
redirection
Changed views to partials, created the repository view,
created a repository_helper to further aid the creation of variables
across different controllers