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

Action to automatically create doc issues on PR merge #61946

Closed
wants to merge 5 commits into from
Closed

Action to automatically create doc issues on PR merge #61946

wants to merge 5 commits into from

Conversation

ianjevans
Copy link
Contributor

@ianjevans ianjevans commented Mar 12, 2021

This PR creates a GitHub Action workflow that is run when PRs to master or release-* branches are merged. If the PR's message body has a release note item, and the release note message isn't "None", it will create a corresponding issue in cockroachdb/docs with the title of the PR and the release note message.

Currently the docs team runs a script to generate docs release note issues after generating the release notes file for a particular release. That is, issues are created in batches at each alpha/beta/release/patch release. If a release is delayed significantly, the docs team might not become aware of a doc impact issue for weeks.

Creating docs issues when the PR merges allows the docs team to become aware of and triage issues with doc impact in real time.

Release note: None

Related to: #59546

@ianjevans ianjevans added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-build-system labels Mar 12, 2021
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss
Copy link
Collaborator

rafiss commented Mar 12, 2021

If the PR's message body has a release note item, and the release note message isn't "None"

I think it is a fairly common workflow for PR bodies to have no release note, but the commit messages to have them. I think it's because there is other tooling out there that pulls out release notes from the commit messages. Is it possible to inspect the commit message too?

@ianjevans
Copy link
Contributor Author

If the PR's message body has a release note item, and the release note message isn't "None"

I think it is a fairly common workflow for PR bodies to have no release note, but the commit messages to have them. I think it's because there is other tooling out there that pulls out release notes from the commit messages. Is it possible to inspect the commit message too?

Can you find an example of a PR with the release note item in the commit message? I should be able to add a step that searches the github context for comment messages, but it'd be easier if I could look at a real one to figure out where in the event context I should be looking.

branches:
- master
- 'release-*'
types: [closed]
Copy link
Contributor

Choose a reason for hiding this comment

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

passing comment: is [closed] also when someone closes a PR but does not merge it?

Copy link
Contributor Author

@ianjevans ianjevans Mar 15, 2021

Choose a reason for hiding this comment

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

The action will trigger in that scenario, yes, but the job has a check to see if the PR was merged on L17.

    if:              ${{ github.event.pull_request.merged == true }}

GitHub Actions doesn't have a PR merge event, only a close event.

So the end result is that if a PR is closed without merging, the Action will trigger but immediately end on the job check.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@rafiss
Copy link
Collaborator

rafiss commented Mar 15, 2021

@ianjevans here's an example where the PR doesn't have release notes (in this case the commits have Release note: None) #61713

@jseldess
Copy link
Contributor

@ianjevans, this script looks in commit messages for Release note texts, I believe, in case it's helpful: https://github.com/cockroachdb/cockroach/blob/master/scripts/release-notes.py

@blathers-crl blathers-crl bot requested a review from otan April 20, 2021 21:29
@otan otan removed their request for review April 21, 2021 15:57
@yzdocs
Copy link
Contributor

yzdocs commented May 11, 2021

Since the approach is substantially different, I have opened another PR for continuation of work here started by @ianjevans. The new PR: #65006

@cockroach-teamcity
Copy link
Member

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


ianjevans seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jlinder
Copy link
Collaborator

jlinder commented Nov 10, 2023

@ianjevans, I'm going to close this PR given the goal of the PR is now accomplished by the Create Docs Issue nightly which creates issues in Jira for any new commits each day.

@jlinder jlinder closed this Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-system C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants