Skip to content

Commit

Permalink
Merge branch 'main' into tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Feb 4, 2024
2 parents 5ac6795 + 1de9d36 commit 3eaa780
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/enforce-linking-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-lockfiles.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sync Cargo lockfile with Zenoh's dependants
name: Sync Cargo lockfiles

on:
schedule:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/update-release-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Update release project
on:
issues:
types: [opened, edited, labeled]
pull_request_target:
types: [closed]
branches:
- main
workflow_call:

defaults:
Expand Down Expand Up @@ -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:
Expand All @@ -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/[email protected]
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/[email protected]
with:
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}
project-url: ${{ steps.get-project-url.outputs.result }}
14 changes: 8 additions & 6 deletions examples/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ pub struct CommonArgs {
#[arg(short, long)]
/// A configuration file.
config: Option<String>,
#[arg(short, long, default_value = "peer")]
/// The Zenoh session mode.
mode: Wai,
#[arg(short, long)]
/// The Zenoh session mode [default: peer].
mode: Option<Wai>,
#[arg(short = 'e', long)]
/// Endpoints to connect to.
connect: Vec<String>,
Expand All @@ -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() {
Expand Down

0 comments on commit 3eaa780

Please sign in to comment.