<feed xmlns='http://www.w3.org/2005/Atom'>
<title>reflectub, branch master</title>
<subtitle>Mirror a user’s GitHub repositories</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/'/>
<entry>
<title>Increase version v0.0.2 -&gt; v0.0.3</title>
<updated>2022-06-04T17:50:06+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-04T17:50:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=75751a78116fa8c45abc6aabb3ae4715977c45f6'/>
<id>75751a78116fa8c45abc6aabb3ae4715977c45f6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'make-errors-more-traceable-2'</title>
<updated>2022-06-04T17:15:35+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-04T17:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=57cd001192adc095843af0c18044ff996fca0480'/>
<id>57cd001192adc095843af0c18044ff996fca0480</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>database: Update copyright year</title>
<updated>2022-06-04T16:59:25+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-04T16:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=6fe38d83ec90f5adb411706ed23d9a8b2929aed8'/>
<id>6fe38d83ec90f5adb411706ed23d9a8b2929aed8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>database::Repo: From&lt;&amp;github::Repo&gt;: Use newest update date</title>
<updated>2022-06-04T16:14:08+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-04T16:14:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=b324a7a96acbaf589fedca245e9e5659ee9cd8fa'/>
<id>b324a7a96acbaf589fedca245e9e5659ee9cd8fa</id>
<content type='text'>
It turns out the GitHub `updated_at` field doesn't change when new
commits are pushed to the repository, only when the repository config
etc. changes.

In order to update the mirrors when any update happens in the
repository, we need to look at both of those date values to see if
they've been updated.

Take the most recent of `updated_at` or `pushed_at` and set it to
`(database::Repo).updated_at`. This allows us to refresh the repo when
either of those dates change, catching all GitHub repo updates.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It turns out the GitHub `updated_at` field doesn't change when new
commits are pushed to the repository, only when the repository config
etc. changes.

In order to update the mirrors when any update happens in the
repository, we need to look at both of those date values to see if
they've been updated.

Take the most recent of `updated_at` or `pushed_at` and set it to
`(database::Repo).updated_at`. This allows us to refresh the repo when
either of those dates change, catching all GitHub repo updates.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year</title>
<updated>2022-06-04T12:25:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-04T12:25:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=34c69bd00249d78e9277bb66c6c0bf7e5b4613a1'/>
<id>34c69bd00249d78e9277bb66c6c0bf7e5b4613a1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>github::Repo: Change `git_url` to `clone_url`</title>
<updated>2022-06-04T12:11:54+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-04T03:25:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=996426344348fb72b283a2df18a981d073aecad8'/>
<id>996426344348fb72b283a2df18a981d073aecad8</id>
<content type='text'>
I was getting errors mirroring and updating:

    failed to connect to github.com: Connection timed out; class=Os (2)

and

    remote 'origin' already exists; class=Config (7); code=Exists(-4)

It turns out that the `git_url` field, which I had been using previously
to mirror and clone repositories, stopped working. My guess is that it's
because Reflectub is not authorised to clone GitHub "git://" URLs, so
the connection timed out. I'm not sure why this stopped being allowed,
though.

The URL change seems to have happened around March 2022, or at least
between December 2021 and April 2022.

The second error was caused by a previously-created repository existing
in the filesystem, but not being in the database as it hadn't been
correctly mirrored. For now, I've decided not to fix that problem and am
only fixing the URL issue.

The GitHub API also includes a `clone_url` field, which contains an
HTTPS clone URL. Using this URL to mirror fixes the timeout problem.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was getting errors mirroring and updating:

    failed to connect to github.com: Connection timed out; class=Os (2)

and

    remote 'origin' already exists; class=Config (7); code=Exists(-4)

It turns out that the `git_url` field, which I had been using previously
to mirror and clone repositories, stopped working. My guess is that it's
because Reflectub is not authorised to clone GitHub "git://" URLs, so
the connection timed out. I'm not sure why this stopped being allowed,
though.

The URL change seems to have happened around March 2022, or at least
between December 2021 and April 2022.

The second error was caused by a previously-created repository existing
in the filesystem, but not being in the database as it hadn't been
correctly mirrored. For now, I've decided not to fix that problem and am
only fixing the URL issue.

The GitHub API also includes a `clone_url` field, which contains an
HTTPS clone URL. Using this URL to mirror fixes the timeout problem.
</pre>
</div>
</content>
</entry>
<entry>
<title>git.rs: Add more context to errors</title>
<updated>2022-06-02T22:50:17+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-02T22:50:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=b8a188e19e7ec0ae381c18a5a4db86fb576bf95a'/>
<id>b8a188e19e7ec0ae381c18a5a4db86fb576bf95a</id>
<content type='text'>
Add full definitions for our new error variant ideas.

Use a distinct variant and message in each error case in order to trace
errors to the line of code where they occur.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add full definitions for our new error variant ideas.

Use a distinct variant and message in each error case in order to trace
errors to the line of code where they occur.
</pre>
</div>
</content>
</entry>
<entry>
<title>Cargo.toml: Update 'thiserror' to v1.0.31</title>
<updated>2022-06-02T22:49:54+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-02T22:49:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=f2234472fd415f457fca24bc8760f38e54f4f97d'/>
<id>f2234472fd415f457fca24bc8760f38e54f4f97d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update Cargo.lock</title>
<updated>2022-06-02T22:45:49+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-02T22:45:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=d7cd942c35e2561d807518dd988a200249a45501'/>
<id>d7cd942c35e2561d807518dd988a200249a45501</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>git.rs: Ideas for error structure and context</title>
<updated>2022-06-02T21:22:39+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-06-02T21:22:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/reflectub/commit/?id=0951bb614aa1602983dacbf604c5a52e44d49bc3'/>
<id>0951bb614aa1602983dacbf604c5a52e44d49bc3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
