drone / proposal

Drone Project Design Documents
13 stars 4 forks source link

Default branch inconsistency for UI actions #37

Open Subbeh opened 1 year ago

Subbeh commented 1 year ago

When creating a build or setting up a cron job, the UI does not default to the correct branch for some settings.

In case of the "New Build", Drone finds the correct branch regardless of the branch input field being empty. However, the parameters supplied in the same window do not get applied unless the correct branch is defined.

As for cron jobs, these do not seem to work at all unless specifically setting the branch name (main in my case).

It would help if the main branch name applies to all options if left empty, or alternatively adding a global setting for defining the default branch.

Repro

Pipeline

.drone.yml ```yaml --- kind: pipeline type: docker name: test trigger: branch: - main steps: - name: testing image: busybox commands: - echo $FOO ```

Test with default branch

WebUI ![image](https://github.com/drone/proposal/assets/1278086/21c76364-1518-4051-a376-eabd78f9a949)
Logs ``` latest: Pulling from library/busybox Digest: sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79 Status: Image is up to date for busybox:latest + echo $FOO ```

Test with main branch

WebUI ![image](https://github.com/drone/proposal/assets/1278086/943dcf83-c36a-4592-a9f5-f9dc1598241e)
Logs ``` latest: Pulling from library/busybox Digest: sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79 Status: Image is up to date for busybox:latest + echo $FOO BAR ```