Tags: halostatue/starlist
Tags
feat: Use pontil_build A minor update, for a change. Instead of using `esgleam`, starlist is now bundled with `pontil_build`. Other dependencies were updated. The README example also shows the use of step-security/harden-runner to limit the outbound network requests permitted. Signed-off-by: Austin Ziegler <[email protected]>
feat: Streamlined implementation with breaking changes This release presents more breaking changes. It uses the newest version of `pontil` for GitHub Actions integration and has improved maintainability through some architectural changes. ### User-Facing Changes The previous version will work until you're ready to update. If you are not using custom templates, the main change will be that the data format version has changed and your existing `data.json` _must_ be re-fetched even if fetch is otherwise disabled. #### Configuration changes - `fetch.login` allows for the selection of stars for specific users. - `fetch.order` allows the stars to be returned in either descending (most recent first) or ascending order (oldest first). The default is ascending. - `render.output_dir` allows for specific output directories. - `git.committer` now requires both `name` and `email` provided, or the whole configuration omitted. Previously, one could be provided. Additionally, the TOML configuration parser is much stricter. Previously, if `fetch.source` was neither `"api"` nor `"file"`, it would fall back to `"api"`. It now produces an error. #### Fetch Changes In addition to supporting `fetch.login` and `fetch.order`, the GraphQL query now fetches up to 10 languages per repository from the previous limit of 5. The action also filters starred private repositories from `data.json` automatically (this is _not_ done by the CLI module). #### Template Changes Several template variables changed, requiring updates to any custom templates that may be in use: - `repo.license` → `repo.licence`: This was an error that should have been corrected with the previous version. If no licence can be found, the fallback value will be "Unknown licence". - `repo.language_count` → `repo.total_languages`: This is a rename for clarity. `language_count` implied that it was limited to the number of languages _retrieved_, but it's actually the total number of languages that GitHub counts on the repository. - `repo.topic_count` is no longer stored in `data.json`, but is instead computed from the retrieved list of topics when rendering. - Index and page templates now have separate variable sets. In v2, both template types received all variables. Now page templates cannot access `partitions`, `partition_count`, or `partition_description`, and index templates cannot access `groups`, `stars`, `group_count`, or `group_description`. ### Implementation Changes There's been significant restructuring to reduce code duplication between the CLI and action implementations and shift `starlist.gleam` to being the common interface between the two. There have also been a number of type and field renames to better reflect the expected usage. The CLI is not published as its own NPM package, but that will happen in a future update. Signed-off-by: Austin Ziegler <[email protected]>
fix: Really fix starlist default template issue - Fixed default template resolution by reading embedded templates if the templates cannot be found in the checked out repo. - Fixed committer validation: empty name or email strings in TOML config are now treated as missing, falling back to bot defaults in the action. - Fixed git push authentication: the action now builds the remote URL from `GITHUB_REPOSITORY` and `GITHUB_SERVER_URL` instead of mutating the existing remote URL. - Fixed commit with nothing to commit: `git diff --cached --quiet` is checked before committing, so a clean working tree no longer causes an error. - Updated PAT documentation: classic PATs require `public_repo` or `repo`; fine-grained PATs require `contents: read and write` on the target repository. - Added `persist-credentials: false` guidance to action documentation. Signed-off-by: Austin Ziegler <[email protected]>
1.1.0 / 2024-10-26 In preparation for several major changes (see the [roadmap](./ROADMAP.md)), halostatue/starlist configuration is now configured with a single configuration input parameter, `config`. The configuration for `token` remains a separate input because it must be masked on output. New configuration options will be added only to the new config parameter object, and any configuration option present in the config parameter take precedence over the now deprecated named input parameters. For consistency, the names of the date/time formatting configuration keys are also normalized to the same pattern. Defaults remain the same. Warnings are printed on the of old configuration input parameters (`date_time`, `git_commit_message`, `git_email`, `git_name`, `git_pull_options`, `load_stars_from_json`, `output_filename`, and `template_path`). Warnings will also be printed on date/time formatting keys that use camel case (`dateStyle`, `timeStyle`, `dayPeriod`, `fractionalSecondDigits`, `hourCycle`, `numberingSystem`, and `timeZoneName`). The use of the old configuration parameters will print warnings. - The undocumented parameter `git_read_only` has been renamed to `git_local` with no backwards compatibility check. This emphasizes that this should be used only for local development testing.
1.0.0 / 2024-10-22
Forked from [simonecorsi/mawesome][mawesome] with substantial changes.
It is not backwards compatible.
- Input Changes
- Removed `compact-by-topic` without direct replacement. The fields
`topics` and `byTopic` have been added to the template data for use
in the template.
- Renamed `api-token` to `token` and described the permissions
required for a classic Personal Access Token. Noted fine-grained PAT
support as untested with a proposed permissions set.
- Renamed `github-email` and `githu-name` to `git_email` and
`git_name`. The defaults and purpose remain the same.
- Exposed `git_pull_options` to alter the options provided to
`git-pull` when preparing a commit. (This had been available but
undocumented as `git-pull-method`.)
- Added `load_stars_from_json` to load the star data from the
`data.json` file. This permits halostatue/starlist to be run
multiple times in the same workflow _without_ retrieving the star
data from the GitHub API. In this way, two separate executions of
halostatue/starlist can be used to simulate the previous option
`compact-by-topic` with separate templates.
- Added `date_time` to control the formatting of date and time values
from timestamps.
- Renamed `output-filename` and `template-path` to `output_filename`
and `template_path`, respectively. (This assists with local testing
as environment variables with dashes in them are illegal under Bash
4+.)
- Switched from EJS to Nunjucks for template management.
- Replaced [simonecorsi/gh-star-fetch][gh-star-fetch] with an in-tree
GraphQL query and data transformation.
- Removed the `compactByTopics` configuration option.
- Package and Build Changes
- Built for Node 20 using pnpm instead of npm.
- Switched to Mise instead of Volta for version management.
- Switched Biome.js for formatting and linting instead of ESLint and
Prettier.
- Switched to tsx instead of ts-node / ts-node-dev.
- Removed commitlint, got, husky, lint-staged, markdown-release, nyc,
semantic-release, and sinon.
- Improved in-tree local execution for testing by not requiring
`$GITHUB_REPOSITORY` and `$GITHUB_REF`, as well as adding the
undocumented boolean option `git_read_only` to prevent modifying the
local repo.
PreviousNext