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, 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: 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 }} diff --git a/examples/src/lib.rs b/examples/src/lib.rs index 255ac01917..0da43cfcab 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs @@ -20,9 +20,9 @@ pub struct CommonArgs { #[arg(short, long)] /// A configuration file. config: Option, - #[arg(short, long, default_value = "peer")] - /// The Zenoh session mode. - mode: Wai, + #[arg(short, long)] + /// The Zenoh session mode [default: peer]. + mode: Option, #[arg(short = 'e', long)] /// Endpoints to connect to. connect: Vec, @@ -48,10 +48,12 @@ impl From<&CommonArgs> for Config { Some(path) => Config::from_file(path).unwrap(), None => Config::default(), }; + println!("ARGS mode: {:?} ", value.mode); match value.mode { - Wai::Peer => config.set_mode(Some(zenoh::scouting::WhatAmI::Peer)), - Wai::Client => config.set_mode(Some(zenoh::scouting::WhatAmI::Client)), - Wai::Router => config.set_mode(Some(zenoh::scouting::WhatAmI::Router)), + Some(Wai::Peer) => config.set_mode(Some(zenoh::scouting::WhatAmI::Peer)), + Some(Wai::Client) => config.set_mode(Some(zenoh::scouting::WhatAmI::Client)), + Some(Wai::Router) => config.set_mode(Some(zenoh::scouting::WhatAmI::Router)), + None => Ok(None), } .unwrap(); if !value.connect.is_empty() {