From be6a4f3222b2db84d86c93114cad605245e2da4a Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Wed, 27 Sep 2023 17:51:47 +0200 Subject: [PATCH] add-to-project workflow: automatically assign pr to its creator (#36) ## Description Add labeled PRs to PR creator ## Changes Made Add labeled PRs to PR creator ## Related Issues Fixes #35 ## Checklist - [x] I have used a PR title that is descriptive enough for a release note. - [x] I have tested these changes locally. - [ ] I have added appropriate tests or updated existing tests. - [ ] I have tested these changes on a dedicated VM or a customer VM [name of the VM] - [x] I have added appropriate documentation or updated existing documentation. --------- Co-authored-by: Bot --- .github/workflows/add-to-project.yaml | 9 +++++++++ README.MD | 5 +++-- RELEASE_NOTES.md | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/add-to-project.yaml b/.github/workflows/add-to-project.yaml index 38104c5d..42555ab1 100644 --- a/.github/workflows/add-to-project.yaml +++ b/.github/workflows/add-to-project.yaml @@ -28,3 +28,12 @@ jobs: project-url: ${{ inputs.project-url != '' && inputs.project-url || secrets.PLATFORM_PROJECT_URL }} github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} labeled: ${{ inputs.labeled }} + assing-pr-to-creator: + name: Assign PR to creator + runs-on: ubuntu-latest + steps: + - name: Assign PR to creator + uses: thomaseizinger/assign-pr-creator-action@v1.0.0 + if: github.event_name == 'pull_request' + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.MD b/README.MD index 6164fdce..bba90c07 100644 --- a/README.MD +++ b/README.MD @@ -5,9 +5,10 @@ This repository hosts [re-usable github workflows][re-usable-github-workflows]. The repository includes: - [add-to-project](.github/workflows/add-to-project.yaml) workflow: when a new - issue or PR is added to a repository, it is also added to the + issue or PR is added to a repository, it is also added - by default - to the [SynchroHub platform project](https://github.com/orgs/zaphiro-technologies/projects/2) - with status `new`. + or to the project defined by `project-url` input parameter with status `new`. + When a new PR is added, the PR is assigned to its creator. - [check-pr](.github/workflows/check-pr.yaml) workflow: when a new PR is added to a repository or any change occurs to the pr, the pr is validated to be sure that labels are valid. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e07bd18e..385d9651 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,9 +1,11 @@ # github-workflows Release Notes -## 0.0.2-dev - 2023-09-13 +## 0.0.2-dev - 2023-09-27 ### Features +- add-to-project workflow: automatically assign pr to its creator (PR #36 by + @chicco785) - add-to-project workflow: make project url configurable as input parameter (PR #33 by @chicco785) - add-to-project workflow: make labels configurable as inputs (PR #27 by