Display Order of GitHub Releases

Iniciado por joomlamz, Hoje at 14:25

Respostas: 1   |   Visualizações: 2

Tópico anterior - Tópico seguinte

0 Membros e 1 Visitante estão a ver este tópico.

**Desafios enfrentados por designers em software de código aberto (e como superá-los)**

Como especialista em tecnologia, posso dizer que os designers em software de código aberto enfrentam desafios significativos ao desenvolver soluções escaláveis e confiáveis. O termo "código aberto" refere-se a software que é desenvolvido e mantido por uma comunidade de desenvolvedores, com o código-fonte disponível para todos. Embora isso ofereça muitas vantagens, como colaboração e reusabilidade, também traz desafios únicos para os designers.

**Desafio 1: Manter a coerência e a consistência**

Em software de código aberto, é comum encontrar diferentes versões e forks de um mesmo projeto. Isso pode levar a inconsistências na interface do usuário e na experiência do usuário. Além disso, a falta de uma única autoridade central pode dificultar a tomada de decisões e a implementação de mudanças.

**Desafio 2: Gerenciar a complexidade**

Os projetos de código aberto tendem a ser mais complexos e escaláveis do que os projetos privados. Isso porque eles precisam ser projetados para atender às necessidades de uma comunidade diversa de usuários. Além disso, a complexidade pode ser exacerbada pela falta de uma estrutura de desenvolvimento centralizada.

**Desafio 3: Manter a segurança**

A segurança é um desafio constante em qualquer sistema de software, mas em software de código aberto, ela pode ser ainda mais difícil de gerenciar. Isso porque o código-fonte está disponível para todos, o que significa que qualquer vulnerabilidade pode ser explorada por atacantes.

**Superando os desafios**

Para superar esses desafios, os designers em software de código aberto precisam adotar abordagens inovadoras e colaborativas. Aqui estão algumas estratégias que podem ajudar:

* **Desenvolver uma estratégia de design unificada**: Isso pode incluir a criação de guias de estilo e diretrizes de design para garantir que a interface do usuário e a experiência do usuário sejam consistentes em todo o projeto.
* **Implementar ferramentas de gerenciamento de código**: Ferramentas como Git e Jenkins podem ajudar a gerenciar a complexidade do código e a garantir que as mudanças sejam implantadas corretamente.
* **Desenvolver uma comunidade de segurança**: Isso pode incluir a criação de um programa de bug bounty e a implementação de ferramentas de segurança para ajudar a identificar e corrigir vulnerabilidades.

**Para garantir que os seus projetos e fóruns rodam sem falhas**

Para garantir que os seus projetos e fóruns rodam sem falhas, convido-vos a conhecer as soluções de alojamento de alta performance da AplicHost em https://aplichost.com. Nossa equipe de especialistas em tecnologia está aqui para ajudar a manter os seus projetos em execução, com soluções de alojamento escaláveis e confiáveis. Além disso, nossa plataforma de gerenciamento de fóruns é projetada para ser fácil de usar e personalizar, permitindo que você foque em desenvolver conteúdo e interagir com a sua comunidade.

Display Order of GitHub Releases



Tópico: Display Order of GitHub Releases
Categoria: Tutoriais | Programação & Tecnologia
Idioma Principal: Português (Conteúdo de Tecnologia)

Descrição do Conteúdo / Informações:
-------------------------------------------------------------------------


Conclusion


The display order of GitHub Releases is not based on the release title, not based on the tag name in simple lexical order, and not simply sorted by publication date in descending order.

If you want more predictable ordering for GitHub Releases, it is recommended to use SemVer-formatted tag names.

GitHub determines release ordering using a combination of the following criteria:

Aspect
What is Used

"Latest" determination
An explicitly selected Set as latest release / make_latest, or automatic SemVer-based detection

/releases/latest
The release considered "latest," excluding drafts and prereleases

Releases page display
Influenced by tag/commit dates and SemVer rather than publication date. The exact sorting algorithm is not officially documented.

In the GitHub UI, you can choose Set as latest release when creating a release. If you do not, the latest label is automatically assigned based on Semantic Versioning, according to the official documentation. (GitHub Docs)



Why Doesn't It Appear to Be Sorted by Date?


According to the GitHub REST API documentation for Get the latest release, the latest release is determined using created_at. However, created_at does not represent when the release was drafted or published—it represents the date of the commit associated with the release. (GitHub Docs)

For example:

Release A published on 2026-06-26
-> The tag points to an old commit from 2025

Release B published on 2026-06-20
-> The tag points to a newer commit from 2026

In this case, although Release A has the newer publication date, GitHub may still treat Release B as the newer release.



Is It Sorted by Tag Name?


No, not in simple lexical order.

However, if the tag name can be interpreted as a Semantic Version, it does influence GitHub's ordering.

The official GitHub Changelog explains that, before explicit "latest" selection was introduced, the latest release was determined by the most recent release date, with Semantic Versioning used as a tie-breaker when releases shared the same date. GitHub now allows maintainers to explicitly designate the latest release. (The GitHub Blog)

A GitHub Community discussion also explains that releases created on the same day are expected to be ordered by SemVer, and that GitHub primarily relies on tag/commit dates rather than the release object's publication timestamp. (GitHub)

As a result, tag names like the following can produce unexpected ordering:

release/69.3
build-20240626
2024-06-26-001
v1.0
v1.0.0-beta.10
v1.0.0-beta.9

If you want GitHub to recognize version ordering correctly, use standard SemVer tags such as:

v1.2.3
v1.2.4
v1.3.0
v2.0.0



Is It Sorted by Title?


No.

The release title (name) is purely a display field. In the GitHub API, tag_name and name are separate fields. For ordering and latest-release determination, the relevant fields are the tag, SemVer, created_at, published_at, and make_latest—not the release title. (GitHub Docs)



Notes When Using the API


The GET /repos/{owner}/{repo}/releases endpoint (List releases) provides pagination parameters such as per_page and page, but it does not support explicit sorting parameters such as sort or direction. (GitHub Docs)

GitHub Community discussions also note that the API does not guarantee a particular ordering, so applications should not depend on the response order. (GitHub)

Therefore, if your application requires deterministic ordering, you should sort the releases yourself.

gh release list \
--repo OWNER/REPO \
--limit 100 \
--json tagName,name,publishedAt,createdAt,isLatest,isPrerelease,isDraft \
--jq '.[] | [.tagName, .name, .publishedAt, .createdAt, .isLatest, .isPrerelease, .isDraft] | @tsv'

gh release list can output fields such as createdAt, publishedAt, tagName, name, isLatest, isPrerelease, and isDraft as JSON. (GitHub CLI)



Practical Recommendations


If you want your releases to appear in a predictable order, the following practices are recommended:

• Use SemVer-formatted tags

For example:

v1.2.3

• Avoid creating releases for old commits after newer releases

GitHub's ordering can be influenced by the tag's commit date rather than the publication date.

• Explicitly mark the release as the latest when appropriate

In the UI, select Set as latest release. Via the API, use make_latest: true. The make_latest field accepts true, false, or legacy, and draft or prerelease releases cannot be marked as the latest. (GitHub Docs)

• Do not rely on GitHub's response order

Sort releases yourself according to your application's requirements—for example, by publishedAt, createdAt, or Semantic Version.

In summary, the order of GitHub Releases is determined neither by the release title, nor by the tag name in simple lexical order, nor by publication date alone. Instead, it is influenced by GitHub's internal handling of the latest release, Semantic Versioning, and tag/commit dates.


Joomlamz
Consultoria em Informática
-------------------------------------------------------
Especialista em Sistemas Web & Manutenção de Servidores.
A desenvolver o novo AplPortal com suporte a PHP 8.
Precisa de ajuda profissional? Contacte-me.

Tags: