Commit graph

17 commits

Author SHA1 Message Date
Shinya Maeda
42173d379c Use AR releation "count" method 2019-01-04 22:17:03 +09:00
Shinya Maeda
f5f52da885 Add spec for Releases::Source and Link models
Releases::Source and Releases::Link are covered by tests
2019-01-04 22:17:02 +09:00
Shinya Maeda
66755c9ed5 Support CURD operation for release asset links
- Add Releases::Links model
- Expose it in release API
- Add integration tests
2019-01-04 22:17:02 +09:00
Shinya Maeda
8f1e96c89b Add spec for Release API
Add spec for all release API - GET, POST, PUT, DELETE.
Also, fixes some minior bugs.
2018-12-31 14:35:57 +09:00
Alessio Caiazza
6a2decf545 Refactor Release services
CreateReleaseService and UpdateReleaseService now takes all the release
attributes as constructor parameters. This will simplify attribute
expansion
2018-12-31 14:34:15 +09:00
Alessio Caiazza
a7aaad96f3 ReleasesFinder will always return a relation 2018-12-31 12:05:56 +09:00
Alessio Caiazza
b9aac409a5 Expose assets in releases API 2018-12-31 12:05:56 +09:00
Alessio Caiazza
1ea2d9faa5 Add releases API
This commit introduces Releases API under /api/v4/projects/:id/releases

* We are introducing release policies at project level.
* We are deprecating releases changes from tags, both api and web
interface.
* Tags::CreateService no longer create a release

This feature is controlled by :releases_page feature flag
2018-12-31 12:05:56 +09:00
Alessio Caiazza
b782ba1113
Add name, author and sha to releases
This commit adds a name to each release, defaulting it to tag name,
keeps track of the SHA when a new release is created and tracks the
current user as release author.
2018-12-13 12:15:21 +01:00
gfyoung
50abbd3e53 Enable frozen string in app/models/*.rb
Partially addresses #47424.
2018-07-26 16:55:41 -07:00
Nick Thomas
e94cd6fdfe Add markdown cache columns to the database, but don't use them yet
This commit adds a number of _html columns and, with the exception of Note,
starts updating them whenever the content of their partner fields changes.

Note has a collision with the note_html attr_accessor; that will be fixed later

A background worker for clearing these cache columns is also introduced - use
`rake cache:clear` to set it off. You can clear the database or Redis caches
separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
respectively.
2016-10-07 02:54:25 +01:00
Jeroen van Baarsen
f1479b56b7
Remove the annotate gem and delete old annotations
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
2016-05-09 18:00:28 +02:00
Zeger-Jan van de Weg
47da013cf8 Annotate the models 2016-05-06 08:27:46 +02:00
Dmitriy Zaporozhets
a237999f00
Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-13 19:22:46 +01:00
Dmitriy Zaporozhets
b67fdfff3c
Refactor release code a bit
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-09 15:30:50 +01:00
Dmitriy Zaporozhets
cb8b9c3fe2
Add association and validation for Release model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-06 15:29:04 +01:00
Dmitriy Zaporozhets
1c4d1c3bd6
Add release model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 11:03:02 +01:00