gitforge/modules/structs
steven.guiheux 0ef80f6b0f feat: expose access token creation date in API responses (#12620)
## Checklist

Following the previous contribution that added admin-level management of user access tokens (particularly useful for bot/service accounts), this change exposes the created_at field in the API response when listing or retrieving access tokens.

This information is needed to implement token rotation policies for these users — knowing when a token was created allows administrators to identify and revoke stale tokens.

### Tests for Go changes

- I added test coverage for Go changes...
  - [X] in their respective `*_test.go` for unit tests.
  - [X] `make pr-go` before pushing

### Documentation

- [X] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [X] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/12620): <!--number 12620 --><!--line 0 --><!--description ZXhwb3NlIGFjY2VzcyB0b2tlbiBjcmVhdGlvbiBkYXRlIGluIEFQSSByZXNwb25zZXM=-->expose access token creation date in API responses<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12620
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org>
2026-05-20 18:45:38 +02:00
..
action.go feat: expose run_id in ...actions/runners/jobs endpoint (#12480) 2026-05-09 02:31:03 +02:00
activity.go
activitypub.go Improved signature handling & instance actor (#8275) 2025-07-01 19:49:00 +02:00
admin_user.go feat: Add support for administrators to set email visibility on user accounts (#9668) 2025-10-15 03:21:15 +02:00
attachment.go fix(ui): Add pasted images to dropzone 2025-06-30 12:42:22 +02:00
commit_status.go feat: mark skipped checks as skipped (#12606) 2026-05-17 18:00:49 +02:00
commit_status_test.go feat: mark skipped checks as skipped (#12606) 2026-05-17 18:00:49 +02:00
cron.go
doc.go
fork.go feat: sync forks (#2364) 2025-04-07 07:00:38 +00:00
git_blob.go api: GitBlob consistent naming 2025-06-13 11:35:14 +02:00
git_hook.go
hook.go Revert "fix(api): document is_system_webhook field (#7784)" (#8286) 2025-06-26 00:36:18 +02:00
issue.go chore: add modernizer linter (#11936) 2026-04-02 03:29:37 +02:00
issue_comment.go feat(api): more verbose error messages and swagger comments for posting issue comments (#11368) 2026-03-07 23:16:20 +01:00
issue_label.go
issue_milestone.go
issue_reaction.go
issue_stopwatch.go
issue_test.go chore: replace gopkg.in/yaml.v3 with go.yaml.in/yaml/v3 (#8956) 2025-08-20 15:31:12 +02:00
issue_tracked_time.go
lfs_lock.go
mirror.go feat: add configuration to only push mirror selected branches (#7823) 2025-07-12 00:39:35 +02:00
miscellaneous.go
moderation.go
nodeinfo.go
notifications.go
org.go
org_member.go
org_team.go fix: correct malformed CreateTeamOption example (#11093) 2026-02-16 05:55:20 +01:00
package.go
pull.go fix(migrations): transfer PR flow information (#7421) 2025-04-03 06:47:37 +00:00
pull_review.go Fix invalid swagger syntax of $ref with sibling (#7019) 2025-02-21 14:09:21 +00:00
quota.go
release.go
repo.go chore: add modernizer linter (#11936) 2026-04-02 03:29:37 +02:00
repo_actions.go feat: implement ephemeral runners (#9962) 2026-02-16 18:56:56 +01:00
repo_branch.go
repo_collaborator.go
repo_commit.go
repo_compare.go
repo_file.go feat(api): add last_commit_when to contents response (#7418) 2025-04-18 09:31:40 +00:00
repo_flags.go
repo_key.go
repo_note.go
repo_refs.go
repo_tag.go
repo_topic.go
repo_tree.go
repo_watch.go
repo_wiki.go
runner.go chore: remove field ephemeral from runner registration response (#11350) 2026-02-18 16:49:44 +01:00
secret.go fix: normalize secrets consistently, display accurate help (#11052) 2026-02-09 17:02:18 +01:00
settings.go
status.go
task.go
user.go chore: add modernizer linter (#11936) 2026-04-02 03:29:37 +02:00
user_app.go feat: expose access token creation date in API responses (#12620) 2026-05-20 18:45:38 +02:00
user_email.go
user_gpgkey.go chore: add modernizer linter (#11936) 2026-04-02 03:29:37 +02:00
user_key.go fix: expose API fields for ssh keys (#12517) (#12625) 2026-05-18 17:44:37 +02:00
variable.go fix: normalize secrets consistently, display accurate help (#11052) 2026-02-09 17:02:18 +01:00
visible_type.go
workflow.go feat(api): return run_number in workflow dispatch (#7286) 2025-03-25 21:22:32 +00:00