From 530f25fd2601c2c03cbfd641207dda43d21cff73 Mon Sep 17 00:00:00 2001 From: Luca Comellini <luca.com@gmail.com> Date: Thu, 22 Feb 2024 13:11:30 -0800 Subject: [PATCH] Add NGINX bot (#1607) Problem: We want to automate adding labels and responding to issues and PRs. Solution: Use a bot! --- .github/workflows/nginx-bot.yml | 35 +++++++++++++++++++++++++++++++++ docs/developer/pull-request.md | 5 +++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/nginx-bot.yml diff --git a/.github/workflows/nginx-bot.yml b/.github/workflows/nginx-bot.yml new file mode 100644 index 0000000000..beb556db4c --- /dev/null +++ b/.github/workflows/nginx-bot.yml @@ -0,0 +1,35 @@ +name: NGINX Bot + +on: + issues: + types: + - opened + - reopened + - edited + pull_request: + types: + - opened + - reopened + - edited + +concurrency: + group: ${{ github.event.issue.number || github.event.pull_request.number }}-bot + cancel-in-progress: true + +permissions: + issues: write + pull-requests: write + +jobs: + comment: + name: Run the bot + runs-on: ubuntu-22.04 + steps: + - name: Bot Action + uses: lucacome/nginx-bot@main + with: + pr-assignee-from-issue: 583 + warn-missing-issue: true + missing-issue-message: | + Please make sure to include the issue number in the PR description to automatically close the issue when the PR is merged. + See [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) and our [Pull Request Guidelines](../docs/developer/pull-request.md) for more information. diff --git a/docs/developer/pull-request.md b/docs/developer/pull-request.md index 7297abc69f..76d6286609 100644 --- a/docs/developer/pull-request.md +++ b/docs/developer/pull-request.md @@ -8,8 +8,9 @@ in the curated [release notes](../CHANGELOG.md), add a brief note that summarizes the change in the `release-note` block in the PR description. - Fill in [our pull request template](/.github/PULL_REQUEST_TEMPLATE.md). -- Make sure to include the issue number in the PR description to automatically close the issue when the PR mergers. - See [Closing Issues via Pull Requests](https://github.blog/2013-05-14-closing-issues-via-pull-requests/) for details. +- Make sure to create an issue and include the issue number in the PR description to automatically close the issue when the PR is merged. + See [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) for details. + An issue might not be required for PRs addressing typos, broken links, etc. - For significant changes, break your changes into a logical series of smaller commits. By approaching the changes incrementally, it becomes easier to comprehend and review the code. - Use your best judgement when resolving comments. Simple, unambiguous comments should be resolved by the submitter,