Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.pullrequest
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DOCS_BRANCH='main'
DOCS_BRANCH_TYPE='pull request'

DOCS_PR_NUMBER='2441'
Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Committing an environment file with hardcoded, build-specific values like DOCS_PR_NUMBER can lead to maintainability issues. This approach is not scalable, as it would require a new commit and pull request every time a different PR needs to be deployed this way.

A more robust and standard practice is to use environment variables provided by your CI/CD system (e.g., GitHub Actions, GitLab CI). These systems typically expose the pull request number, branch name, and other contextual information that can be used in your build scripts directly, without the need for hardcoded files in the repository.

If this is a one-time, temporary measure, please consider whether this file needs to be merged into the main branch at all. If it's intended to be a permanent part of the workflow, I strongly recommend refactoring it to leverage CI/CD environment variables.

Loading