Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regcognize option --no-default-labels #22

Closed
radiomix opened this issue Feb 10, 2025 · 1 comment
Closed

Regcognize option --no-default-labels #22

radiomix opened this issue Feb 10, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@radiomix
Copy link

radiomix commented Feb 10, 2025

Add a self-hosted running that only is labeled MY_TAG

Registering self-hosted runners with config.sh always get label self-hosted attached.

According to GithubActions: About self-hosted runners labels passing the --no-default-labels option to config.sh prevents that.

It would nice to have mr.bash recognizing --no-default-labels to not add any label except the ones specified in --label MY_TAG

TODO

We would have to change

./config.sh --unattended --replace --url '$url' --token '$token' --name '$name' --labels '$labels' --runnergroup '$group'

into something like
./config.sh --no-default-labels --unattended --replace --url '$url' --token '$token' --name '$name' --labels '$extraLabels' --runnergroup '$group'

IF option --no-default-labels was passed.

@vbem vbem added the enhancement New feature or request label Feb 11, 2025
@vbem
Copy link
Owner

vbem commented Feb 11, 2025

Hi @radiomix ,

I read through the latest official documentation for this section, and found a few other options for config.sh were also supported now.

So, in order to adapt the iteration of official config.sh, I added an --opts option into this wrapper, which simply passthrough user given options to config.sh.

For the task-specific needs of --no-default-labels, it can be achieved by:

./mr.bash add --org <ORG-NAME-1> --repo <REPO-NAME-1> --opts "--no-default-labels"

Thanks a lot for your feedback and suggestion. ✨✨✨

@vbem vbem closed this as completed Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants