Skip to content

Script to compare if packages are updated on CI - #733

Merged
f-f merged 4 commits into
purescript:masterfrom
andys8:ci/check-if-versions-are-outdated
Dec 18, 2020
Merged

Script to compare if packages are updated on CI#733
f-f merged 4 commits into
purescript:masterfrom
andys8:ci/check-if-versions-are-outdated

Conversation

@andys8

@andys8 andys8 commented Oct 16, 2020

Copy link
Copy Markdown
Contributor

Script checks each package if there is a newer version on github.
It'll update an issue and open/close its state depending on the result.

Related

Original Repository

https://github.com/andys8/purescript-update-package-sets

Issues

https://github.com/purescript/package-sets/issues/704#issuecomment-707702373

Comment thread .github/workflows/check-versions.yaml
- run: npm --prefix ci install
- run: npm --prefix ci run build
- name: Compare package versions
run: npm --prefix ci start ${{ secrets.GITHUB_TOKEN }}

@andys8 andys8 Oct 16, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In my project, I created a personal token. I don't know what's the best approach here. The token needs to have the rights to update the configured (hardcoded) issue.

See https://github.com/purescript/package-sets/pull/733/files#diff-2928a06dfa0974722e5e2dba6d89c923e1bd975239b5479a7a6072f9c5f9dc68R65-R67

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.

..and the GITHUB_TOKEN that we get by default doesn't have that, right?

@andys8 andys8 Oct 24, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It had not the rights to change a comment my user (@andys8) created in this repository (https://github.com/purescript/package-sets), when running as an action in (https://github.com/andys8/purescript-update-package-sets). There might be a change that it has enough when running in the same repository where the comment is. I would give it a try. If it fails, I'd create a personal token, and change the github action to use that one. One could also create a new issue, but doesn't need to. At this point try and error might be faster to get it working :D

@andys8
andys8 force-pushed the ci/check-if-versions-are-outdated branch from 1169358 to fd1dc7f Compare October 16, 2020 13:42
@andys8 andys8 changed the title Script to compare if package are updated on CI Script to compare if packages are updated on CI Oct 16, 2020
@andys8
andys8 force-pushed the ci/check-if-versions-are-outdated branch from fd1dc7f to 7fc5ca7 Compare October 16, 2020 13:46
Comment thread .github/workflows/check-versions.yaml
- run: npm --prefix ci install
- run: npm --prefix ci run build
- name: Compare package versions
run: npm --prefix ci start ${{ secrets.GITHUB_TOKEN }}

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.

..and the GITHUB_TOKEN that we get by default doesn't have that, right?

Comment thread .github/workflows/check-versions.yaml Outdated
Script checks each package if there is a newer version on github.
It'll update an issue and open/close its state depending on the result.

Related:

<https://github.com/andys8/purescript-update-package-sets>
<https://github.com/purescript/package-sets/issues/704#issuecomment-707702373>
@andys8
andys8 force-pushed the ci/check-if-versions-are-outdated branch from 7fc5ca7 to 6589403 Compare October 24, 2020 14:49
@andys8

andys8 commented Oct 24, 2020

Copy link
Copy Markdown
Contributor Author

Force pushed the changes and rebased onto master

@andys8

andys8 commented Dec 16, 2020

Copy link
Copy Markdown
Contributor Author

I recently noticed github will stop scheduled jobs for Repositories that have been inactive for 60 days. This wouldn't be the case for this purescript/package-sets (because of activity), but for https://github.com/andys8/purescript-update-package-sets. So it would be an improvement to avoid this, if we integrate it here with this PR.

Can I do anything to "push this over the line"?

@f-f

f-f commented Dec 16, 2020

Copy link
Copy Markdown
Member

@andys8 I'm so sorry, I thought we merged this already 😅 🙈

I'll take another quick look and merge this. Thank you again! (for the ping too)

@f-f
f-f merged commit d3c6493 into purescript:master Dec 18, 2020
@andys8

andys8 commented Dec 19, 2020

Copy link
Copy Markdown
Contributor Author

Thanks for the review. It seems to work nicely.

Screenshot_20201219-104826

andys8 added a commit to andys8/purescript-update-package-sets that referenced this pull request Dec 19, 2020
@andys8

andys8 commented Dec 19, 2020

Copy link
Copy Markdown
Contributor Author

I deprecated the original repository, disabled CI there, and archived it.
https://github.com/andys8/purescript-update-package-sets

@f-f

f-f commented Dec 19, 2020

Copy link
Copy Markdown
Member

Wonderful! Thank you again 😊

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