Skip to content

Fix contributor workflow#2226

Merged
casperklein merged 1 commit intomasterfrom
casperklein-patch-1
Sep 29, 2021
Merged

Fix contributor workflow#2226
casperklein merged 1 commit intomasterfrom
casperklein-patch-1

Conversation

@casperklein
Copy link
Copy Markdown
Member

Description

This should finally fix the contributors workflow. I've tested it successfully in a test repo.

Fixes #2224

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@casperklein casperklein requested a review from a team September 29, 2021 01:34
@casperklein casperklein self-assigned this Sep 29, 2021
@casperklein casperklein added area/ci kind/improvement Improve an existing feature, configuration file or the documentation labels Sep 29, 2021
Comment on lines +49 to +52
run: |
git pull
git checkout contributors-update
echo "::set-output name=head_sha::$(git rev-parse contributors-update)"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The relevant commit should have been committed locally to be pushed to the remote contributors-update branch. I believe git rev-parse @ would work just as well here, without needing to pull.

I was writing a response to you with that suggested fix, but forgot to send it prior to working on a PR that implemented it.

Copy link
Copy Markdown
Member Author

@casperklein casperklein Sep 29, 2021

Choose a reason for hiding this comment

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

I tried that before. Without git pull, git checkout contributors-update fails.

Not removing git pull , git rev-parse @ also works.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not removing git pull

Doesn't the PyGithub API used by the add-contributors action not commit locally to push to the remote branch? It seems odd that a git pull would be required if the commit pushed is the same commit SHA locally and remote?

Something else perhaps is going on that I missed/misunderstood?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I cannot help you with that. I don't know how add-contributors action works in detail (not very familiar with python).

@polarathene
Copy link
Copy Markdown
Member

I don't mind this PR being merged, but we may want to consider the one I submitted roughly at the same time, although it's got more going on..

@casperklein casperklein merged commit 231af0f into master Sep 29, 2021
@casperklein casperklein deleted the casperklein-patch-1 branch September 29, 2021 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci kind/improvement Improve an existing feature, configuration file or the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants