Skip to content

commit_date: code cleanup and readme updates#475

Merged
crazy-max merged 1 commit intodocker:masterfrom
crazy-max:commit-date-changes
Nov 19, 2024
Merged

commit_date: code cleanup and readme updates#475
crazy-max merged 1 commit intodocker:masterfrom
crazy-max:commit-date-changes

Conversation

@crazy-max
Copy link
Copy Markdown
Member

@crazy-max crazy-max commented Nov 19, 2024

follow-up #471 (comment)

@trim2 Fyi, I see in response schema that commit.committer for /repos/{owner}/{repo}/commits/{ref}: https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#get-a-commit

Can be null:

        "committer": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "title": "Git User",
              "description": "Metaproperties for Git author/committer information.",
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "examples": [
                    "\"Chris Wanstrath\""
                  ]
                },
                "email": {
                  "type": "string",
                  "examples": [
                    "\"chris@ozmm.org\""
                  ]
                },
                "date": {
                  "type": "string",
                  "examples": [
                    "\"2007-10-29T02:42:39.000-07:00\""
                  ]
                }
              }
            }
          ]
        },

If that happens it would just return the current date. I think that's fine but we could improve that as follow-up. Probably warn if that happens.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max changed the title fallback to current date if git committer date not available commit_date: code cleanup and readme updates Nov 19, 2024
@crazy-max crazy-max marked this pull request as ready for review November 19, 2024 14:51
@crazy-max crazy-max merged commit 359e915 into docker:master Nov 19, 2024
@crazy-max crazy-max deleted the commit-date-changes branch November 19, 2024 14:51
renovate Bot added a commit to sdwilsh/sOS that referenced this pull request Apr 29, 2026
##### [\`v6\`](docker/metadata-action@v5...v6)


---
##### [\`v6.0.0\`](https://github.com/docker/metadata-action/releases/tag/v6.0.0)

- Node 24 as default runtime (requires [Actions Runner v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1) or later) by [@crazy-max](https://github.com/crazy-max) in [#605](docker/metadata-action#605)
- List inputs now preserve `#` inside values while still supporting full-line `#` comments by [@crazy-max](https://github.com/crazy-max) in [#607](docker/metadata-action#607)
- Switch to ESM and update config/test wiring by [@crazy-max](https://github.com/crazy-max) in [#602](docker/metadata-action#602)
- Bump lodash from 4.17.21 to 4.17.23 in [#588](docker/metadata-action#588)
- Bump [@actions/core](https://github.com/actions/core) from 1.11.1 to 3.0.0 in [#599](docker/metadata-action#599)
- Bump [@actions/github](https://github.com/actions/github) from 6.0.1 to 9.0.0 in [#597](docker/metadata-action#597)
- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.68.0 to 0.79.0 in [#604](docker/metadata-action#604)
- Bump [@isaacs/brace-expansion](https://github.com/isaacs/brace-expansion) from 5.0.0 to 5.0.1 in [#600](docker/metadata-action#600)
- Bump semver from 7.7.3 to 7.7.4 in [#603](docker/metadata-action#603)

**Full Changelog**: <docker/metadata-action@v5.10.0...v6.0.0>

---
##### [\`v5.10.0\`](https://github.com/docker/metadata-action/releases/tag/v5.10.0)

- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.66.0 to 0.68.0 in [#559](docker/metadata-action#559) [#569](docker/metadata-action#569)
- Bump js-yaml from 3.14.1 to 3.14.2 in [#564](docker/metadata-action#564)

**Full Changelog**: <docker/metadata-action@v5.9.0...v5.10.0>

---
##### [\`v5.9.0\`](https://github.com/docker/metadata-action/releases/tag/v5.9.0)

- Add `tag-names` output to return tag names without image base name by [@crazy-max](https://github.com/crazy-max) in [#553](docker/metadata-action#553)
- Bump [@babel/runtime-corejs3](https://github.com/babel/runtime-corejs3) from 7.14.7 to 7.28.2 in [#539](docker/metadata-action#539)
- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.62.1 to 0.66.0 in [#555](docker/metadata-action#555)
- Bump brace-expansion from 1.1.11 to 1.1.12 in [#540](docker/metadata-action#540)
- Bump csv-parse from 5.6.0 to 6.1.0 in [#532](docker/metadata-action#532)
- Bump semver from 7.7.2 to 7.7.3 in in [#554](docker/metadata-action#554)
- Bump tmp from 0.2.3 to 0.2.5 in [#541](docker/metadata-action#541)

**Full Changelog**: <docker/metadata-action@v5.8.0...v5.9.0>

---
##### [\`v5.8.0\`](https://github.com/docker/metadata-action/releases/tag/v5.8.0)

- New `is_not_default_branch` global expression by [@crazy-max](https://github.com/crazy-max) in [#535](docker/metadata-action#535)
- Allow to match part of the git tag or value for semver/pep440 types by [@crazy-max](https://github.com/crazy-max) in [#536](docker/metadata-action#536) [#537](docker/metadata-action#537)
- Bump [@actions/github](https://github.com/actions/github) from 6.0.0 to 6.0.1 in [#523](docker/metadata-action#523)
- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.56.0 to 0.62.1 in [#526](docker/metadata-action#526)
- Bump form-data from 2.5.1 to 2.5.5 in [#533](docker/metadata-action#533)
- Bump moment-timezone from 0.5.47 to 0.6.0 in [#525](docker/metadata-action#525)
- Bump semver from 7.7.1 to 7.7.2 in [#524](docker/metadata-action#524)

**Full Changelog**: <docker/metadata-action@v5.7.0...v5.8.0>

---
##### [\`v5.7.0\`](https://github.com/docker/metadata-action/releases/tag/v5.7.0)

- Global expressions support for labels and annotations by [@crazy-max](https://github.com/crazy-max) in [#489](docker/metadata-action#489)
- Support disabling outputs as environment variables by [@omus](https://github.com/omus) in [#497](docker/metadata-action#497)
- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.44.0 to 0.56.0 in [#507](docker/metadata-action#507) [#509](docker/metadata-action#509)
- Bump csv-parse from 5.5.6 to 5.6.0 in [#482](docker/metadata-action#482)
- Bump moment-timezone from 0.5.46 to 0.5.47 in [#501](docker/metadata-action#501)
- Bump semver from 7.6.3 to 7.7.1 in [#504](docker/metadata-action#504)

**Full Changelog**: <docker/metadata-action@v5.6.1...v5.7.0>

---
##### [\`v5.6.1\`](https://github.com/docker/metadata-action/releases/tag/v5.6.1)

- Fix GitHub API request fallback for commit date by [@crazy-max](https://github.com/crazy-max) in [#478](docker/metadata-action#478)
- Revert to default commit SHA length of 7 by [@crazy-max](https://github.com/crazy-max) in [#480](docker/metadata-action#480)

**Full Changelog**: <docker/metadata-action@v5.6.0...v5.6.1>

---
##### [\`v5.6.0\`](https://github.com/docker/metadata-action/releases/tag/v5.6.0)

- Add `commit_date` global expression by [@trim21](https://github.com/trim21) in [#471](docker/metadata-action#471) [#475](docker/metadata-action#475)
- Increase short commit sha length to 12 for uniqueness by [@crazy-max](https://github.com/crazy-max) in [#467](docker/metadata-action#467)
- Bump [@actions/core](https://github.com/actions/core) from 1.10.1 to 1.11.1 [#460](docker/metadata-action#460)
- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.16.1 to 0.44.0 [#391](docker/metadata-action#391) [#399](docker/metadata-action#399) [#413](docker/metadata-action#413) [#441](docker/metadata-action#441)
- Bump braces from 3.0.2 to 3.0.3 [#424](docker/metadata-action#424)
- Bump cross-spawn from 7.0.3 to 7.0.5 [#474](docker/metadata-action#474)
- Bump csv-parse from 5.5.5 to 5.5.6 [#412](docker/metadata-action#412)
- Bump moment-timezone from 0.5.44 to 0.5.46 [#383](docker/metadata-action#383) [#470](docker/metadata-action#470) [#459](docker/metadata-action#459)
- Bump path-to-regexp from 6.2.2 to 6.3.0 [#454](docker/metadata-action#454)
- Bump semver from 7.6.0 to 7.6.3 [#400](docker/metadata-action#400) [#411](docker/metadata-action#411) [#440](docker/metadata-action#440)
- Bump undici from 5.26.3 to 5.28.4 [#386](docker/metadata-action#386) [#402](docker/metadata-action#402)

**Full Changelog**: <docker/metadata-action@v5.5.1...v5.6.0>

---
##### [\`v5.5.1\`](https://github.com/docker/metadata-action/releases/tag/v5.5.1)

- Don't set `cwd://` prefix for local bake files by [@crazy-max](https://github.com/crazy-max) in [#382](docker/metadata-action#382)

**Full Changelog**: <docker/metadata-action@v5.5.0...v5.5.1>

---
##### [\`v5.5.0\`](https://github.com/docker/metadata-action/releases/tag/v5.5.0)

- Set `cwd://` prefix for bake files path by [@crazy-max](https://github.com/crazy-max) in [#370](docker/metadata-action#370)
- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.16.0 to 0.16.1 in [#371](docker/metadata-action#371)
- Bump moment from 2.29.4 to 2.30.1 in [#373](docker/metadata-action#373)
- Bump moment-timezone from 0.5.43 to 0.5.44 in [#374](docker/metadata-action#374)

**Full Changelog**: <docker/metadata-action@v5.4.0...v5.5.0>

---
##### [\`v5.4.0\`](https://github.com/docker/metadata-action/releases/tag/v5.4.0)

- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.15.0 to 0.16.0 in [#369](docker/metadata-action#369)
- Bump csv-parse from 5.5.2 to 5.5.3 in [#365](docker/metadata-action#365)

**Full Changelog**: <docker/metadata-action@v5.3.0...v5.4.0>

---
##### [\`v5.3.0\`](https://github.com/docker/metadata-action/releases/tag/v5.3.0)

- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.14.0 to 0.15.0 in [#363](docker/metadata-action#363) (fixes [#362](docker/metadata-action#362))

**Full Changelog**: <docker/metadata-action@v5.2.0...v5.3.0>

---
##### [\`v5.2.0\`](https://github.com/docker/metadata-action/releases/tag/v5.2.0)

- Custom annotations support by [@crazy-max](https://github.com/crazy-max) in [#361](docker/metadata-action#361)

**Full Changelog**: <docker/metadata-action@v5.1.0...v5.2.0>

---
##### [\`v5.1.0\`](https://github.com/docker/metadata-action/releases/tag/v5.1.0)

- Annotations support by [@crazy-max](https://github.com/crazy-max) in [#352](docker/metadata-action#352)
- Split bake definition into two files by [@crazy-max](https://github.com/crazy-max) in [#353](docker/metadata-action#353)
- Allow images input to be empty to output bare tags by [@crazy-max](https://github.com/crazy-max) in [#358](docker/metadata-action#358)
- Bump [@actions/github](https://github.com/actions/github) from 5.1.1 to 6.0.0 in [#348](docker/metadata-action#348)
- Bump [@babel/traverse](https://github.com/babel/traverse) from 7.17.3 to 7.23.2 in [#350](docker/metadata-action#350)
- Bump [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.12.0 to 0.14.0 in [#349](docker/metadata-action#349) [#357](docker/metadata-action#357)
- Bump csv-parse from 5.5.0 to 5.5.2 in [#346](docker/metadata-action#346)
- Bump semver from 7.5.3 to 7.5.4 in [#335](docker/metadata-action#335)

**Full Changelog**: <docker/metadata-action@v5.0.0...v5.1.0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant