Skip to content

Automatically build on PRs to the community branch - #4289

Merged
jacob1 merged 3 commits into
webbukkit:v3.0-community-editionfrom
jacob1:build-on-prs
Oct 29, 2026
Merged

jacob1 merged 3 commits into
webbukkit:v3.0-community-editionfrom
jacob1:build-on-prs

Conversation

@jacob1

@jacob1 jacob1 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

I think it would be good to verify that PRs sent to the community branch compile, and let us download the actions jars for easier testing. No reason not to, github is more than generous enough to handle it, and in my other main project we set it up this way.

Also, I disabled the spellcheck workflow. It could probably be fixed by updating runs-on: ubuntu-20.04 to a more modern ubuntu but I don't think it's very useful.

@jacob1
jacob1 requested a review from a team October 26, 2026 02:42
@taranovegor

Copy link
Copy Markdown

I'm not sure about removing spellcheck.yaml. There's a really easy fix, just change the runner to a current version of Ubuntu, and it will work. Otherwise, if we decide to remove it, it would be better to split the commits.

@taranovegor taranovegor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved

@jacob1
jacob1 force-pushed the build-on-prs branch 2 times, most recently from 02ff8a7 to 1506858 Compare October 26, 2026 20:38
Also, manually specify list of files to check. Exclude CLAUDE.md because humans aren't editing that file and there's no use in spellchecking it (which is a maintanence burden)
@jacob1

jacob1 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

I'm not sure about removing spellcheck.yaml. There's a really easy fix, just change the runner to a current version of Ubuntu, and it will work. Otherwise, if we decide to remove it, it would be better to split the commits.

Ok, I put it back. But I still question if it's worth maintaining. As a compromise I excluded CLAUDE.md, because that file is edited by and meant to be read by bots. It could have a lot of technical terminology that doesn't pass the spell checker. (That said I whitelisted it all anyway).

@reusteur73
reusteur73 self-requested a review October 29, 2026 05:47

@reusteur73 reusteur73 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, approving. The inline comments and the note below are suggestions only and shouldn't block the merge. They can go in a follow-up PR.

Version hash of PR builds

On pull_request events, actions/checkout checks out the temporary merge commit (refs/pull/N/merge), not the head of the PR. As a result, git rev-parse HEAD in the version job returns the hash of that merge commit. From the run on this PR:

HEAD is now at a09a3de5 Merge 0a86768d… into 7e0124e0…
Version: 3.x-dev+a09a3de

a09a3de isn't a commit of the PR (its head is 0a86768) and doesn't exist anywhere else. It also changes every time the base branch moves, even when the PR itself hasn't changed. So a tester reporting /dynmap version gives us a hash we can't trace back.

Building the merge result is still useful, since it checks that the PR compiles against the current base. I'd keep that and only change the hash used for the version:

hash=$(git rev-parse --short=7 "${{ github.event.pull_request.head.sha || 'HEAD' }}")

Optionally, we could also add a -prN suffix so a PR jar can't be confused with a branch build.

Comment thread .spellcheck.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I noticed that .github/ISSUE_TEMPLATE/*.md are no longer spellchecked (though we probably won't edit those files much)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I tried to include them, but then it reported a huge number of spelling errors. And I still don't want to maintain the spell checking lol. I think they were never scanned at all based on all the errors, ** must not dive into dot directories.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since CLAUDE.md is no longer in the spellcheck sources, are these additions still needed? None of these words appear in README.md or CONTRIBUTING.md.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They are not needed. But maybe they'll show up in the readme someday too ... decided to include them anyway arbitrarily.

@jacob1

jacob1 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Decided to apply the github.event.pull_request.head.sha thing now. Missed that earlier. Seems to work, and already picked up the correct hash.

@jacob1
jacob1 merged commit 38a38c6 into webbukkit:v3.0-community-edition Oct 29, 2026
38 of 44 checks passed
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.

3 participants