Skip to content

Conversation

@ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Sep 7, 2024

Blocked by #1679, then a rebase is needed.

This skips writing changes to draft features when the only change is the draft_date value. This prevents needlessly large diffs when updating these files and makes it possible to find out which areas we've touched least recently.

Fixes #1716.

@ddbeck ddbeck force-pushed the no-date-only-spec-draft-updates branch 5 times, most recently from 1434921 to 862af60 Compare September 7, 2024 19:45
This skips writing changes to draft features when the only change is the
`draft_date` value. This prevents needlessly large diffs when updating
these files and makes it possible to find out which areas we've touched
least-recently.

Fixes web-platform-dx#1716
@ddbeck ddbeck force-pushed the no-date-only-spec-draft-updates branch from 862af60 to 7780216 Compare September 7, 2024 19:53
@ddbeck ddbeck marked this pull request as ready for review September 7, 2024 19:55
Copy link
Contributor

@autonome autonome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, just a note on some inline docs that'd be helpful to future readers

changes.length === 1 && !changes[0].added && !changes[0].removed;
const onlyDateChanges =
!noChanges &&
changes.length === 3 &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document the magic 1 and 3 numbers above

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! I won't even remember that in a week. 😅 Fixed with 13e94db.

@ddbeck ddbeck added the tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings label Sep 10, 2024
Copy link
Collaborator

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected for me 👍

@Elchi3 Elchi3 merged commit e50d213 into web-platform-dx:main Sep 12, 2024
@ddbeck ddbeck deleted the no-date-only-spec-draft-updates branch September 12, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update-drafts shouldn't modify draft_date when there are no other changes

3 participants