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

Actions: Add workflow to request docs review #5285

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

adityasharad
Copy link
Collaborator

When a PR is labelled with docs-review-required, this workflow comments on the PR to notify the GitHub CodeQL docs team.
Runs on pull_request_target events so it can write comments to the PR.
Since this runs in the context of the base repo, it must not check out the PR or use untrusted data from the event payload.

Only runs when the PR base is github/codeql, to prevent notifications from forks.

@github/docs-content-codeql does this work for your needs?

@docs-bot
Copy link

:octocat:📚 Thanks for the docs ping! 🛎️ This was added to our docs first-responder project board. A team member will be along shortly to respond. To request changes to the docs you can also open a CodeQL docs issue.

felicitymay
felicitymay previously approved these changes Mar 1, 2021
Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

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

Many thanks 😄

I think the label name needs to try and make it clear when it should be added, rather than whether or not a review by the docs team is required. Otherwise this looks as if it ought to work nicely 🛎️

# Run only on labelled PRs to the main repository.
# Do not run on PRs to forks.
if:
github.event.label.name == 'docs-review-required'
Copy link
Contributor

@felicitymay felicitymay Mar 1, 2021

Choose a reason for hiding this comment

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

Maybe modify the label name slightly?

Suggested change
github.event.label.name == 'docs-review-required'
github.event.label.name == 'ready-for-docs-review'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about ready-for-docs-review, so it's clear that your review is being requested?

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds perfect 😄

When a PR is labelled with 'ready-for-docs-review',
this workflow comments on the PR to notify the GitHub CodeQL docs team.
Runs on `pull_request_target` events so it can write comments to the PR.
Since this runs in the context of the base repo, it must not check out the PR
or use untrusted data from the event payload.

Only runs when the PR base is github/codeql, to prevent notifications from forks.
Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

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

Thanks 💖

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