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

Changing the name of a branch does not result in updating the stage changelog workflow #526

Closed
lubosmj opened this issue Nov 18, 2021 · 5 comments · Fixed by #527
Closed
Assignees

Comments

@lubosmj
Copy link
Member

lubosmj commented Nov 18, 2021

When I change the name of a branch in template_config.yml, one of the workflows should be updated as well:

 plugin_caps_short: OSTREE
 plugin_dash: pulp-ostree
 plugin_dash_short: ostree
-plugin_default_branch: master
+plugin_default_branch: main
 plugin_name: pulp_ostree
 plugin_snake: pulp_ostree
 post_job_template: null
       - name: Cleanup repository before making changelog PR
         run: rm -rf .lock generation pulp_ostree_client* *-client.tar pulp_ostree.tar todo web docs.tar
 
-      - name: Stage changelog for master branch
-        run: python .github/workflows/scripts/stage-changelog-for-master.py ${{ github.event.inputs.release }}
+      - name: Stage changelog for main branch
+        run: python .github/workflows/scripts/stage-changelog-for-main.py ${{ github.event.inputs.release }}
 
       - name: Create Pull Request for Changelog
         uses: peter-evans/create-pull-request@v3
 
 helper = textwrap.dedent(
     """\
-        Stage the changelog for a release on master branch.
+        Stage the changelog for a release on main branch.
 
         Example:
-            $ python .github/workflows/scripts/stage-changelog-for-master.py 3.4.0
+            $ python .github/workflows/scripts/stage-changelog-for-main.py 3.4.0
 
     """
 )
@lubosmj
Copy link
Member Author

lubosmj commented Nov 18, 2021

In the files templates/github/.github/workflows/release.yml.j2 and templates/github/.github/workflows/scripts/stage-changelog-for-master.py.j2, there should be used {{ plugin_default_branch }} placeholders instead of pure master. Furthermore, the latter file should be named based on the default branch name.

@mdellweg
Copy link
Member

stage-changelog-for-master.py.j2 ...for_default_branch.py.j2 would be an agnostic name...

@quba42
Copy link
Contributor

quba42 commented Nov 18, 2021

Probably a good idea to run git grep master in the plugin template repo, to see what else crops up.

@lubosmj lubosmj self-assigned this Nov 18, 2021
@lubosmj
Copy link
Member Author

lubosmj commented Nov 18, 2021

@mdellweg, what is a proper way of renaming this file with respect to the plugin template regeneration? Can I simply rename it and do not care about the original file since it will not be removed in current plugins automatically?

@mdellweg
Copy link
Member

There is a list of deprecated filenames, and you are advided to delete them. I don't think we do automatically.

lubosmj added a commit to lubosmj/plugin_template that referenced this issue Nov 18, 2021
lubosmj added a commit to lubosmj/plugin_template that referenced this issue Nov 18, 2021
lubosmj added a commit to lubosmj/plugin_template that referenced this issue Nov 18, 2021
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 a pull request may close this issue.

3 participants