Skip to content

feat: set remote.type dynamically from env #1099

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

Open
huxuan opened this issue Nov 16, 2024 · 9 comments
Open

feat: set remote.type dynamically from env #1099

huxuan opened this issue Nov 16, 2024 · 9 comments
Labels
confirmed Prevent from becoming stale feature A new feature or a feature request

Comments

@huxuan
Copy link

huxuan commented Nov 16, 2024

Feature Request

Description

I have a template project hosted both on GitHub and GitLab mostly for demostration, and I want to leverage both GitHub Actions and GitLab CI/CD, so I need to set the remote.type dynamically. But it seems that a validation error will happen when I try to set an env for it.

Expected behavior

Possibility to set remote.type with env.

Actual behavior

A validation error is raised.

Environment

  • Operating System (w/ version): Ubuntu 22.04
  • Python version: 3.10.12
  • Pip version: N/A
  • Semantic-release version: 9.14.0
  • Build tool (w/ version): N/A
pip freeze
N/A

git log --oneline --decorate --graph --all -n 50
N/A

Configuration

Semantic Release Configuration
[tool.semantic_release.remote.type]
env = "SEMANTIC_RELEASE_REMOTE_TYPE"
default = "github"

Build System Configuration
N/A

GitHub Actions Job Definition
N/A

Execution Log

semantic-release -vv command
[06:05:45] DEBUG    [main.main] logging level set to: DEBUG                                                                                                                                             main.py:124
🛡 You are running in no-operation mode, because the '--noop' flag was supplied
           DEBUG    [main.main] global cli options: GlobalCommandLineOptions(noop=True, verbosity=2, config_file='pyproject.toml', strict=False)                                                        main.py:139
           INFO     [util.load_raw_config_file] Loading configuration from pyproject.toml                                                                                                                util.py:79
           DEBUG    [util.load_raw_config_file] Trying to parse configuration pyproject.toml in TOML format                                                                                              util.py:82
1 validation error for RawConfig
remote.type
  Input should be 'bitbucket', 'github', 'gitlab' or 'gitea' [type=enum, input_value={'env': 'SEMANTIC_RELEASE...E', 'default': 'github'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.9/v/enum

Additional context

N/A

@huxuan huxuan added bug Something isn't working properly triage waiting for initial maintainer review labels Nov 16, 2024
@codejedi365 codejedi365 added feature A new feature or a feature request confirmed Prevent from becoming stale and removed bug Something isn't working properly triage waiting for initial maintainer review labels Nov 16, 2024
@codejedi365
Copy link
Contributor

codejedi365 commented Nov 16, 2024

@huxuan, unfortunately it's not a bug, but it is not configured to support an env variable input at this time.

Changing this to a feature request and adding it to the backlog. Thanks for the desired use case. This may ultimately help out #149.

@codejedi365 codejedi365 changed the title Validation error when trying to set remote.type dynamically with env. Request setting remote.type dynamically from env Nov 16, 2024
@huxuan
Copy link
Author

huxuan commented Nov 16, 2024

Sorry I tried to search but did not find that issue, will close this one as already tracked there. Thanks for the prompt response!

@huxuan huxuan closed this as completed Nov 16, 2024
@codejedi365 codejedi365 reopened this Nov 16, 2024
@codejedi365
Copy link
Contributor

That's not quite what I meant, I just realized that the resolution of this issue would partially lead to a resolution of the other one. The other one has been open for years without really any solution that made sense, is all.

@codejedi365 codejedi365 changed the title Request setting remote.type dynamically from env feat: set remote.type dynamically from env Nov 18, 2024
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Jan 18, 2025
@codejedi365
Copy link
Contributor

Still in the backlog, I forgot about this one, it should be easy to knock out quickly.

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Jan 19, 2025
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Mar 20, 2025
@codejedi365
Copy link
Contributor

Still in backlog

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Mar 22, 2025
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label May 21, 2025
@codejedi365
Copy link
Contributor

Still in backlog

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Prevent from becoming stale feature A new feature or a feature request
Projects
None yet
Development

No branches or pull requests

2 participants