Skip to content

Commit b35bfec

Browse files
authored
Revert changes made in commits 876f5b2, 0b23322, e365d58, 1cf502a (#380)
1 parent 876f5b2 commit b35bfec

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/collect-user-submission.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ class IssueInfo:
2828
gh_event_path: pydantic.FilePath
2929
submission: Submission = pydantic.Field(default=None)
3030

31+
def __post_init_post_parse__(self):
32+
with open(self.gh_event_path) as f:
33+
self.data = json.load(f)
34+
3135
def create_submission(self):
3236
self._get_inputs()
3337
self._create_submission_input()
3438
return self
3539

3640
def _get_inputs(self):
37-
with open(self.gh_event_path) as f:
38-
self.data = json.load(f)
39-
4041
self.author = self.data['issue']['user']['login']
4142
self.title = self.data['issue']['title']
4243
self.body = self.data['issue']['body']
@@ -60,8 +61,8 @@ def _create_submission_input(self):
6061
authors.append(
6162
Author(
6263
name=item.get('name', 'anyonymous'),
63-
affiliation=item.get('institution'),
64-
affiliation_url=item.get('institution_url'),
64+
affiliation=item.get('affiliation'),
65+
affiliation_url=item.get('affiliation_url'),
6566
email=item.get('email', ''),
6667
)
6768
)
@@ -77,6 +78,6 @@ def _create_submission_input(self):
7778

7879
if __name__ == '__main__':
7980
issue = IssueInfo(gh_event_path=os.environ['GITHUB_EVENT_PATH']).create_submission()
80-
inputs = issue.submission.model_dump()
81+
inputs = issue.submission.dict()
8182
with open('resource-gallery-submission-input.json', 'w') as f:
8283
json.dump(inputs, f)

.github/workflows/update-resource-gallery.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Update Resource Gallery
22

33
on:
4-
workflow_dispatch:
54
issues:
65
types:
76
- opened

0 commit comments

Comments
 (0)