From 1cece4a285762ae0cd7a6eb0a085b846e667978e Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Mon, 29 Jan 2024 12:36:43 +0100 Subject: [PATCH 1/3] feat: Add merged pull requests to release project --- .github/workflows/update-release-project.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-release-project.yml b/.github/workflows/update-release-project.yml index 1a543fc09d..4a95fb7a0d 100644 --- a/.github/workflows/update-release-project.yml +++ b/.github/workflows/update-release-project.yml @@ -3,6 +3,10 @@ name: Update release project on: issues: types: [opened, edited, labeled] + pull_request_target: + types: [closed] + branches: + - main workflow_call: defaults: @@ -46,7 +50,8 @@ jobs: core.info(`Using release project ${result}`) return result; - - name: Is the issue author a contributor? + - if: ${{ github.event_name == 'issues' }} + name: Is the issue author a contributor? id: author-is-contributor uses: actions/github-script@v7 with: @@ -67,10 +72,17 @@ jobs: core.info(`Is the issue author ${login} a contributor? ${result}`); return result; - - if: ${{ steps.author-is-contributor.outputs.result == 'true' }} + - if: ${{ github.event_name == 'issues' && steps.author-is-contributor.outputs.result == 'true' }} name: Add issue to the release project if it has a release label uses: actions/add-to-project@v0.5.0 with: github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} project-url: ${{ steps.get-project-url.outputs.result }} labeled: release + + - if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merged == 'true' }} + name: Add pull request to the release project + uses: actions/add-to-project@v0.5.0 + with: + github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} + project-url: ${{ steps.get-project-url.outputs.result }} From 12280ccb259d56d3df7714501e81c2029cded944 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Mon, 29 Jan 2024 15:00:49 +0100 Subject: [PATCH 2/3] fix: Missing string interpolation --- .github/workflows/enforce-linking-issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/enforce-linking-issues.yml b/.github/workflows/enforce-linking-issues.yml index 8f711c1f8e..37bb2cf63e 100644 --- a/.github/workflows/enforce-linking-issues.yml +++ b/.github/workflows/enforce-linking-issues.yml @@ -50,7 +50,7 @@ jobs: script: | const login = "${{ github.event.pull_request.user.login }}"; const syntaxUrl = "https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue"; - const message = `@{login} If this pull request contains a bugfix or a new feature, then please consider using \`Closes #ISSUE-NUMBER\` [syntax](${syntaxUrl}) to link it to an issue.` + const message = `@${login} If this pull request contains a bugfix or a new feature, then please consider using \`Closes #ISSUE-NUMBER\` [syntax](${syntaxUrl}) to link it to an issue.` github.rest.issues.createComment({ owner: context.repo.owner, From 6aee15e280bf02a142256fb1db7c15147d11c2db Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Mon, 29 Jan 2024 15:01:09 +0100 Subject: [PATCH 3/3] fix: Workflow name too long --- .github/workflows/sync-lockfiles.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-lockfiles.yml b/.github/workflows/sync-lockfiles.yml index 0e68c7518a..50ab69d7ed 100644 --- a/.github/workflows/sync-lockfiles.yml +++ b/.github/workflows/sync-lockfiles.yml @@ -1,4 +1,4 @@ -name: Sync Cargo lockfile with Zenoh's dependants +name: Sync Cargo lockfiles on: schedule: