fatiando / rockhound

NOTICE: This library is no longer being developed. Use Ensaio instead (https://www.fatiando.org/ensaio). -- Download geophysical models/datasets and load them in Python
BSD 3-Clause "New" or "Revised" License
34 stars 15 forks source link

Setup release drafter #86

Closed leouieda closed 2 years ago

leouieda commented 4 years ago

In the last community call we decided to roll out release drafter on RockHound to test the automated changelog generation (see fatiando/contributing#15). I setup the following labels for this repository:

labels

I would propose we configure all repos to have the same labels (with same colors) to make things easier for us. I'll open a PR to enable the Github Actions workflow for this so we can discuss other configuration options.

Are these labels OK?

santisoler commented 4 years ago

I think these labels are very clear! Maybe within Rockhound we can have another one for new datasets, like new dataset. Or maybe we can label PRs that add new datasets to the feature label.

leouieda commented 4 years ago

Alright, things seem to be working alright. There are few things that will still be manual when making the changelog in the docs:

  1. Copy the draft release to a changes.md file locally
  2. Convert it to rst with pandoc
  3. Use sed to replace the #123 PR numbers with proper links to Github (can use the same command in the current guide for Vim)
  4. Replace the @username author list with the output from git

I would consider removing the last item and maybe leaving it as just the user names to make things simpler. Any thoughts?

hugovk commented 4 years ago

Labels look good! Perhaps also removal for what comes after deprecation?

hugovk commented 4 years ago

Looking at https://github.com/fatiando/rockhound/pull/88/files

One suggestion, add a guard to make sure release drafter doesn't run on people's own forks.

For example: https://github.com/hugovk/pypistats/commit/e3f32234a881df4f708f211fa21852434feec187:

  update_release_draft:
    if: github.repository == 'hugovk/pypistats'

Also this could be omitted, because it's the default (but it's okay to be explicit too):

        with:
          # config name to use, relative to .github/
          config-name: release-drafter.yml
leouieda commented 4 years ago

add a guard to make sure release drafter doesn't run on people's own forks.

Ah good catch! I didn’t know actions ran on forks as well.

Also this could be omitted, because it's the default (but it's okay to be explicit too):

I left it in there just be explicit in what that file meant. I found it confusing at first that there were two .yml files.

leouieda commented 4 years ago

What we need now is updated instructions for pasting the changelog in the PR. We can discuss and try them out here first and then submit to contributing when we roll this out to the other repositories.

Here is a draft:

We could probably build a script that does all of this actually.