Skip to content

Commit 71e4423

Browse files
committed
Run CI on PRs
The CI wasn't run on a PR where the branch was in a fork. This fixes that issue and runs the formatter across the new code.
1 parent 62465a2 commit 71e4423

File tree

3 files changed

+28
-23
lines changed

3 files changed

+28
-23
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
12
name: Continuous Integration Checks
23

34
# All branches
4-
on: push
5+
on: [push, pull_request]
56

67
jobs:
78
build:

pythonsd/sitemap.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33

44

55
class IndexSitemap(Sitemap):
6-
changefreq = 'weekly'
7-
protocol = 'https'
8-
priority = 1.0
6+
changefreq = "weekly"
7+
protocol = "https"
8+
priority = 1.0
99

10-
def items(self):
11-
return [
12-
'index',
13-
]
10+
def items(self):
11+
return [
12+
"index",
13+
]
1414

15-
def location(self, item):
16-
return reverse(item)
15+
def location(self, item):
16+
return reverse(item)
1717

1818

1919
class StaticViewSitemap(Sitemap):
20-
changefreq = 'monthly'
21-
protocol = 'https'
22-
priority = 0.8
20+
changefreq = "monthly"
21+
protocol = "https"
22+
priority = 0.8
2323

24-
def items(self):
25-
return [
26-
'code-of-conduct',
27-
]
24+
def items(self):
25+
return [
26+
"code-of-conduct",
27+
]
2828

29-
def location(self, item):
30-
return reverse(item)
29+
def location(self, item):
30+
return reverse(item)

pythonsd/urls.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from .sitemap import IndexSitemap, StaticViewSitemap
88

99
sitemaps = {
10-
"index": IndexSitemap,
11-
"static": StaticViewSitemap,
10+
"index": IndexSitemap,
11+
"static": StaticViewSitemap,
1212
}
1313

1414

@@ -26,8 +26,12 @@
2626
# XHR/Async requests
2727
path(r"xhr/events/", views.UpcomingEventsView.as_view(), name="upcoming_events"),
2828
path(r"xhr/videos/", views.RecentVideosView.as_view(), name="recent_videos"),
29-
path(r"sitemap.xml", sitemap, {"sitemaps": sitemaps},
30-
name="django.contrib.sitemaps.views.sitemap"),
29+
path(
30+
r"sitemap.xml",
31+
sitemap,
32+
{"sitemaps": sitemaps},
33+
name="django.contrib.sitemaps.views.sitemap",
34+
),
3135
]
3236

3337
# These redirects handle redirecting URLs from the old static site to the new Django site

0 commit comments

Comments
 (0)