Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project Management: Milestone It: Read version from master branch package.json #16511

Merged
merged 3 commits into from
Jul 10, 2019

Conversation

aduth
Copy link
Member

@aduth aduth commented Jul 10, 2019

This pull request seeks to improve the Milestone It custom GitHub action to ensure that the version read from package.json is that of the master branch, not the "current" branch of the pull request being merged. Since the branch of a pull request which has been merged may be stale, the version may not reflect the next release. The version should always be derived based on the master branch at the time of the merge.

In the course of implementing this, a few other necessary changes were made:

  • Milestones should only be applied when a pull request is merged to the master branch. This restriction did not exist previously, so it was possible branches merged to other non-master branches would have a milestone applied.
  • Changed "Skip" exits to use a neutral status code (documentation)

@aduth aduth added the [Type] Project Management Meta-issues related to project management of Gutenberg label Jul 10, 2019
@aduth aduth requested a review from youknowriad July 10, 2019 15:20
@aduth aduth requested review from karmatosed and mapk as code owners July 10, 2019 15:20
Copy link
Contributor

@youknowriad youknowriad 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. Best way to try is to ship :)

@aduth
Copy link
Member Author

aduth commented Jul 10, 2019

Oh, I also meant to link to a few resources which led me to this change:

An example pull request which assigned to the wrong milestone: #16242 (assigned 6.0, should have been 6.1)

In the source branch package.json, the 5.9.x version can be seen, hence why it's assumed 6.0 was selected: https://github.com/faazshift/gutenberg/blob/fix/shortcode-replace/package.json

The GitHub Actions "Accessing the runtime environment" documentation appears to confirm that the source will reflect the branch of the pull request being merged:

/github/workspace: The working directory of the Docker container. GitHub Actions execute in this directory. The path to this directory is set in the GITHUB_WORKSPACE environment variable. This directory contains a copy of the repository (with version GITHUB_SHA) that triggered the workflow. [...]

GITHUB_SHA: The commit SHA that triggered the workflow.

@aduth aduth merged commit 8995efd into master Jul 10, 2019
@aduth aduth deleted the fix/milestone-it-version branch July 10, 2019 17:50
@youknowriad youknowriad added this to the Gutenberg 6.2 milestone Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Project Management Meta-issues related to project management of Gutenberg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants