Skip to content

When running the upload script, look for uncommitted changes and check before upload if necessary.#343

Merged
Standard8 merged 1 commit into
mozilla-extensions:mainfrom
Standard8:check-uncommitted
Jun 4, 2026
Merged

When running the upload script, look for uncommitted changes and check before upload if necessary.#343
Standard8 merged 1 commit into
mozilla-extensions:mainfrom
Standard8:check-uncommitted

Conversation

@Standard8

@Standard8 Standard8 commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

If uncommitted changes are detected, the developer will be prompted and has to enter "y" before they can proceed.

@Standard8 Standard8 requested a review from mandysGit April 24, 2026 14:19
Comment thread scripts/upload.py
Comment on lines +73 to +79
if has_uncommitted_changes():
reply = input(
"\n\nWARNING: There are local uncommitted changes. Are you sure you wish to proceed? (y/N):"
).lower().strip()
if not reply or reply[0] != "y":
sys.exit(1)

@mandysGit mandysGit May 21, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we should not allow it to proceed if there are uncommitted changes.
There could be a situation where the keyboard was accidentally and quickly typed "y", without reading the prompt.

I'd rather have the user clear all uncommitted changes first before pushing to RS. That way, we can be stricter in guaranteeing the code being pushed is from the approved Phab review without anything extra added.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think there's cases that we do want to potentially allow this - e.g. a quick test on dev or staging of something. Forcing commit is additional overhead, though I respect we are trying to be careful here.

How about not allowing uncommitted at all on production, but allowing it for dev & stage?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sounds good! Let's not allow uncommitted only on production.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

r+ with that change.

@Standard8 Standard8 force-pushed the check-uncommitted branch from d591157 to b1b6eec Compare May 27, 2026 11:38
@Standard8 Standard8 requested a review from mandysGit May 27, 2026 11:38
@Standard8 Standard8 merged commit a8adf8a into mozilla-extensions:main Jun 4, 2026
6 checks passed
@Standard8 Standard8 deleted the check-uncommitted branch June 4, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants